Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created August 12, 2012 02:43
Show Gist options
  • Save jugyo/3329214 to your computer and use it in GitHub Desktop.
Save jugyo/3329214 to your computer and use it in GitHub Desktop.
#!/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