Skip to content

Instantly share code, notes, and snippets.

@ryanb
Created March 3, 2010 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanb/321041 to your computer and use it in GitHub Desktop.
Save ryanb/321041 to your computer and use it in GitHub Desktop.
namespace :deploy do
desc "Make sure there are no changes that need to be pushed."
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