Quick and dirty packaging

This commit is contained in:
Samuel Vasko 2013-12-09 18:17:35 +01:00
parent 394c24eb16
commit 27f0eb2c95
2 changed files with 42 additions and 0 deletions

34
pack.rb
View File

@ -0,0 +1,34 @@
# Samuel Vasko 2013
# Cmder packing script -- Creates zip files for relase
require "fileutils"
def create_archive name, exclude
if exclude
exclude = " -x!" + exclude
else
exclude = ""
end
puts "Running 7z a -x@cmder\\packignore" + exclude + " " + name + " cmder"
system("7z a -x@cmder\packignore + "+ name +" cmder")
end
targets = [
["cmder.zip"],
["cmder.7z"],
["cmder_mini.zip", "vendor\\msysgit"]
]
unless system("git describe --abbrev=0 --tags")
puts "Failied to get the last tag from git, looks like something is missing"
end
version = `git describe --abbrev=0 --tags`
FileUtils.touch('Version ' + version)
targets.each do |ar|
create_archive ar[0], ar[1]
end
FileUtils.rm('Version ' + version)

8
packignore Normal file
View File

@ -0,0 +1,8 @@
cmder\launcher
cmder\icons
cmder\.gitignore
cmder\.gitattributes
cmder\.git
cmder\*.rb
cmder\packignore
cmder\Cmder.bat