mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +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'
|
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."
|
desc "generate the bundle file."
|
||||||
task :bundle do
|
task :bundle do
|
||||||
sh 'emacs --batch -l yasnippet.el --eval "(yas/compile-bundle ' +
|
sh 'emacs --batch -l yasnippet.el --eval "(yas/compile-bundle ' +
|
||||||
'\"./yasnippet.el\" \"./yasnippet-bundle.el\" \"./snippets\")"'
|
'\"./yasnippet.el\" \"./yasnippet-bundle.el\" \"./snippets\")"'
|
||||||
end
|
sh "tar czf pkg/yasnippet-bundle-#{$version}.el.tgz yasnippet-bundle.el"
|
||||||
|
|
||||||
def find_version
|
|
||||||
File.read("yasnippet.el") =~ /;; Version: *([0-9.]+) *$/
|
|
||||||
version = $1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "create a release package"
|
desc "create a release package"
|
||||||
task :package do
|
task :package do
|
||||||
version = find_version
|
release_dir = "pkg/yasnippet-#{$version}"
|
||||||
release_dir = "pkg/yasnippet-" + version
|
|
||||||
FileUtils.mkdir_p(release_dir)
|
FileUtils.mkdir_p(release_dir)
|
||||||
files = ['snippets', 'yasnippet.el', 'Rakefile']
|
files = ['snippets', 'yasnippet.el', 'Rakefile']
|
||||||
FileUtils.cp_r files, release_dir
|
FileUtils.cp_r files, release_dir
|
||||||
FileUtils.rm_r Dir[release_dir + "/**/.svn"]
|
FileUtils.rm_r Dir[release_dir + "/**/.svn"]
|
||||||
FileUtils.cd 'pkg'
|
FileUtils.cd 'pkg'
|
||||||
sh "tar cjf yasnippet-" + version + ".tar.bz2 yasnippet-" + version
|
sh "tar cjf yasnippet-#{$version}.tar.bz2 yasnippet-#{$version}"
|
||||||
FileUtils.cd ".."
|
FileUtils.cd ".."
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "create a release package and upload it to google code"
|
desc "create a release package and upload it to google code"
|
||||||
task :release => :package do
|
task :release => [:bundle, :package] do
|
||||||
version = find_version
|
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\"" +
|
" -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
|
end
|
||||||
|
|
||||||
task :default => :bundle
|
task :default => :bundle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user