]> code.delx.au - gnu-emacs-elpa/commitdiff
a new rake task for uploading
authorZhang Chiyuan <pluskid@gmail.com>
Sat, 8 Mar 2008 05:24:00 +0000 (05:24 +0000)
committerZhang Chiyuan <pluskid@gmail.com>
Sat, 8 Mar 2008 05:24:00 +0000 (05:24 +0000)
Rakefile
yasnippet.el

index 489032858c86791b72836657e805bfacfffb4c5b..4ef92847933a9eacd77f48042f380fa8c6744e5e 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -8,17 +8,30 @@ task :bundle do
     '\"./yasnippet.el\" \"./yasnippet-bundle.el\" \"./snippets\")"'
 end
 
-desc "create a release package"
-task :package do
+def find_version
   File.read("yasnippet.el") =~ /;; Version: *([0-9.]+) *$/
   version = $1
+end
+
+desc "create a release package"
+task :package do
+  version = find_version
   release_dir = "pkg/yasnippet-" + version
   FileUtils.mkdir_p(release_dir)
-  files = ['tools', 'snippets', 'yasnippet.el', 'Rakefile']
+  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
+  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
 
 task :default => :bundle
index aea34dfa01e2fd2579746f14e9fa6e4da223a4b6..15ef212fa34db6e35e9c87f1a52f650ebea8fdd8 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright 2008 pluskid
 ;; 
 ;; Author: pluskid <pluskid@gmail.com>
-;; Version: 0.1
+;; Version: 0.1.1
 ;; X-URL: http://code.google.com/p/yasnippet/
 
 ;; This file is free software; you can redistribute it and/or modify