Skip to content

Instantly share code, notes, and snippets.

@csexton
Forked from mdarby/gist:181192
Created September 5, 2009 15:55
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 csexton/181448 to your computer and use it in GitHub Desktop.
Save csexton/181448 to your computer and use it in GitHub Desktop.
before "deploy", "deploy:check_revision"
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 ""
puts " \033[1;33m**************************************************\033[0m"
puts " \033[1;33m* WARNING: HEAD is not the same as origin/master *\033[0m"
puts " \033[1;33m**************************************************\033[0m"
puts ""
exit
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment