Created
July 12, 2011 16:14
-
-
Save ryanb/1078316 to your computer and use it in GitHub Desktop.
Check to see if you have changes in head which have not been pushed before deploying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment