Permalink
Browse files

Tweeks to deployment process

  • Loading branch information...
1 parent 1748147 commit 6dfd8d884ac3a2ba6450319a54c274e84b893dbc @marick committed Jul 13, 2010
Showing with 41 additions and 6 deletions.
  1. +5 −6 NOTES
  2. +35 −0 Rakefile
  3. +1 −0 downloads/gather
View
11 NOTES
@@ -3,16 +3,15 @@ manual.
* Touch the new version number whenever its used.
(Should only be in the project files.)
-* Run the tests.
-* lein jar and rename it to midje-x.x.x.jar
-* lein pom
-* scp pom.xml midje-x.x.x.jar clojars@clojars.org:
+* Rake fresh
+* Rake upload
* Go to the example, 'lein clean', and 'lein deps'. (It should fetch the
new version.)
-* Run the example and compare to stashed result.
* Make a new version of 'run' in the example directory.
-* Try it out against the expected output.
+* Run the example with 'run' and compare to stashed result.
+* Try it out again with lein; check expected output
* DO NOT CLEAN.
* Make new downloads
+* Commit
* git tag -a -m "message" v.x.x.x ;; git push --tags
* Push to github
View
@@ -0,0 +1,35 @@
+# -*- Mode: ruby -*-
+
+require 'rubygems'
+require 'rake'
+
+def jar_name
+ text = File.read('project.clj')
+ unless /midje\s+"(\d+\.\d+\.\d+)"/ =~ text
+ "Couldn't find version in project file."
+ exit 1
+ end
+ "midje-#{$1}.jar"
+end
+
+def doit(text)
+ puts "== " + text
+ system(text)
+end
+
+task :default => :fresh
+
+desc "Test a fresh build, manual checking for now"
+task :fresh do
+ doit("lein clean")
+ doit("lein jar")
+ doit("lein test")
+ puts "If the tests passed, 'rake upload' "
+end
+
+desc "upload to clojars"
+task :upload do
+ doit("lein pom")
+ doit("mv midje.jar #{jar_name} ")
+ doit("scp pom.xml #{jar_name} clojars@clojars.org:")
+end
View
@@ -1,2 +1,3 @@
cd ../examples
+rm ../downloads/semi-sweet-examples.zip
zip -r ../downloads/semi-sweet-examples.zip semi-sweet-examples/

0 comments on commit 6dfd8d8

Please sign in to comment.