public
Created

Check to see if you have changes in head which have not been pushed before deploying

  • Download Gist
deploy.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11
namespace :deploy do
desc "Make sure there is something to deploy"
task :check_revision, :roles => :web do
unless `git rev-parse HEAD` == `git rev-parse origin/master`
puts "WARNING: HEAD is not the same as origin/master"
puts "Run `git push` to sync changes."
exit
end
end
end
before "deploy", "deploy:check_revision"

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.