mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
a new rake task for uploading
This commit is contained in:
parent
5b33a6c8f1
commit
4e9153ad64
19
Rakefile
19
Rakefile
@ -8,17 +8,30 @@ task :bundle do
|
|||||||
'\"./yasnippet.el\" \"./yasnippet-bundle.el\" \"./snippets\")"'
|
'\"./yasnippet.el\" \"./yasnippet-bundle.el\" \"./snippets\")"'
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "create a release package"
|
def find_version
|
||||||
task :package do
|
|
||||||
File.read("yasnippet.el") =~ /;; Version: *([0-9.]+) *$/
|
File.read("yasnippet.el") =~ /;; Version: *([0-9.]+) *$/
|
||||||
version = $1
|
version = $1
|
||||||
|
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)
|
FileUtils.mkdir_p(release_dir)
|
||||||
files = ['tools', '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 ".."
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "create a release package and upload it to google code"
|
||||||
|
task :release => :package do
|
||||||
|
version = find_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"
|
||||||
end
|
end
|
||||||
|
|
||||||
task :default => :bundle
|
task :default => :bundle
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
;; Copyright 2008 pluskid
|
;; Copyright 2008 pluskid
|
||||||
;;
|
;;
|
||||||
;; Author: pluskid <pluskid@gmail.com>
|
;; Author: pluskid <pluskid@gmail.com>
|
||||||
;; Version: 0.1
|
;; Version: 0.1.1
|
||||||
;; X-URL: http://code.google.com/p/yasnippet/
|
;; X-URL: http://code.google.com/p/yasnippet/
|
||||||
|
|
||||||
;; This file is free software; you can redistribute it and/or modify
|
;; This file is free software; you can redistribute it and/or modify
|
||||||
|
Loading…
x
Reference in New Issue
Block a user