Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add release task

  • Loading branch information...
commit 35a92b64c3fc562a093f382e86013a0475e7f8b8 1 parent d57eeef
@rkh authored
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
+
Please sign in to comment.
Something went wrong with that request. Please try again.