Created
January 13, 2012 12:56
-
-
Save nulltask/1605968 to your computer and use it in GitHub Desktop.
rake deploy
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
# On deploy/production branch to deploy production stage. | |
task :deploy do | |
branch = `git branch`.match(/\* (.+)/).to_s.split('/') | |
if branch.count < 2 or branch[0] != 'deploy' | |
return | |
end | |
stage = branch[1] | |
sh "cap #{stage} deploy" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment