mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Downloading from googlecode the bare .el text file is causing problem. pack it as tgz package.
This commit is contained in:
parent
4e9153ad64
commit
85358aa055
28
Rakefile
28
Rakefile
@ -2,36 +2,42 @@
|
||||
|
||||
require 'fileutils'
|
||||
|
||||
def find_version
|
||||
File.read("yasnippet.el") =~ /;; Version: *([0-9.]+) *$/
|
||||
$version = $1
|
||||
end
|
||||
find_version
|
||||
FileUtils.mkdir_p('pkg')
|
||||
|
||||
desc "generate the bundle file."
|
||||
task :bundle do
|
||||
sh 'emacs --batch -l yasnippet.el --eval "(yas/compile-bundle ' +
|
||||
'\"./yasnippet.el\" \"./yasnippet-bundle.el\" \"./snippets\")"'
|
||||
end
|
||||
|
||||
def find_version
|
||||
File.read("yasnippet.el") =~ /;; Version: *([0-9.]+) *$/
|
||||
version = $1
|
||||
sh "tar czf pkg/yasnippet-bundle-#{$version}.el.tgz yasnippet-bundle.el"
|
||||
end
|
||||
|
||||
desc "create a release package"
|
||||
task :package do
|
||||
version = find_version
|
||||
release_dir = "pkg/yasnippet-" + version
|
||||
release_dir = "pkg/yasnippet-#{$version}"
|
||||
FileUtils.mkdir_p(release_dir)
|
||||
files = ['snippets', 'yasnippet.el', 'Rakefile']
|
||||
FileUtils.cp_r files, release_dir
|
||||
FileUtils.rm_r Dir[release_dir + "/**/.svn"]
|
||||
FileUtils.cd 'pkg'
|
||||
sh "tar cjf yasnippet-" + version + ".tar.bz2 yasnippet-" + version
|
||||
sh "tar cjf yasnippet-#{$version}.tar.bz2 yasnippet-#{$version}"
|
||||
FileUtils.cd ".."
|
||||
end
|
||||
|
||||
desc "create a release package and upload it to google code"
|
||||
task :release => :package do
|
||||
task :release => [:bundle, :package] do
|
||||
version = find_version
|
||||
sh "googlecode_upload.py -s \"YASnippet Release " + version + "\"" +
|
||||
sh "googlecode_upload.py -s \"YASnippet Release #{$version}\"" +
|
||||
" -p yasnippet --config-dir=none -l \"Featured,Type-Package,OpSys-All\"" +
|
||||
" pkg/yasnippet-" + version + ".tar.bz2"
|
||||
" pkg/yasnippet-#{$version}.tar.bz2"
|
||||
sh "googlecode_upload.py -s \"YASnippet Bundle #{$version}\"" +
|
||||
" -p yasnippet --config-dir=none -l \"Featured,Type-Package,OpSys-All\"" +
|
||||
" pkg/yasnippet-bundle-#{$version}.el.tgz"
|
||||
|
||||
end
|
||||
|
||||
task :default => :bundle
|
||||
|
Loading…
x
Reference in New Issue
Block a user