Created
February 22, 2009 15:23
-
-
Save ivey/68496 to your computer and use it in GitHub Desktop.
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 :git do | |
task :unpushed do | |
ahead = `git log origin/#{branch}..#{branch} --pretty=oneline --abbrev-commit` | |
unless ahead == "" | |
puts "Whoa, hoss. Looks like you forgot to push the following SHAs:" | |
puts ahead | |
print "Continue with the deploy anyway? [y/N] " | |
if $stdin.gets.chomp.upcase != "Y" | |
puts "Good call. `git push` and come back." | |
exit | |
end | |
end | |
end | |
end | |
before "deploy:update_code", "git:unpushed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment