Add release task

This commit is contained in:
Jon Leighton 2012-01-06 10:51:36 +00:00
parent 508cf9df42
commit 13854e3d40
1 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,8 @@
require 'rspec/core/rake_task'
base = File.dirname(__FILE__)
require base + "/lib/capybara/poltergeist/version"
task :autocompile do
system "coffee --compile --bare --watch " \
"--output lib/capybara/poltergeist/client/compiled " \
@ -10,3 +13,12 @@ RSpec::Core::RakeTask.new('test') do
end
task :default => :test
task :release do
puts "Releasing #{Capybara::Poltergeist::VERSION}, y/n?"
exit(1) unless STDIN.gets.chomp == "y"
sh "gem build poltergeist.gemspec && " \
"gem push poltergeist-#{Capybara::Poltergeist::VERSION}.gem && " \
"git tag v#{Capybara::Poltergeist::VERSION} && " \
"git push --tags"
end