Browse files

add release task

  • Loading branch information...
1 parent a15c7e2 commit ac8e216fdda0d7755fe21d6541a144d9d9cb75f3 @rkh rkh committed Oct 1, 2011
Showing with 15 additions and 1 deletion.
  1. +15 −1 Rakefile
View
16 Rakefile
@@ -1,6 +1,7 @@
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'open-uri'
require 'yaml'
+require 'sinatra/contrib/version'
desc "run specs"
task(:spec) { ruby '-S rspec spec -c' }
@@ -28,7 +29,6 @@ task :doc => 'doc:all'
desc "generate gemspec"
task 'sinatra-contrib.gemspec' do
- require 'sinatra/contrib/version'
content = File.read 'sinatra-contrib.gemspec'
fields = {
@@ -59,3 +59,17 @@ task :travis, [:branch] do |t, a|
system 'git add .travis.yml && git diff --cached .travis.yml'
end
+task :release => :gemspec do
+ sh <<-SH
+ rm -Rf sinatra-contrib*.gem &&
+ gem build sinatra-contrib.gemspec &&
+ gem install sinatra-contrib*.gem --local &&
+ gem push sinatra-contrib*.gem &&
+ git commit --allow-empty -a -m '#{Sinatra::Contrib::VERSION} release' &&
+ git tag -s v#{Sinatra::Contrib::VERSION} -m '#{Sinatra::Contrib::VERSION} release' &&
+ git tag -s #{Sinatra::Contrib::VERSION} -m '#{Sinatra::Contrib::VERSION} release' &&
+ git push && (git push sinatra || true) &&
+ git push --tags && (git push sinatra --tags || true)
+ SH
+end
+

0 comments on commit ac8e216

Please sign in to comment.