Created
August 12, 2012 02:43
-
-
Save jugyo/3329214 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
#!/usr/bin/env ruby | |
# save as post-commit and or post-merge in .git/hooks | |
branch = `git branch | grep '*' | awk '{print $2}'`.chomp | |
if branch == 'master' | |
cmd = 'git push heroku master' | |
puts "exec `#{cmd}`" | |
exec cmd | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment