Skip to content

Instantly share code, notes, and snippets.

@nulltask
Created January 13, 2012 12:56
Show Gist options
  • Save nulltask/1605968 to your computer and use it in GitHub Desktop.
Save nulltask/1605968 to your computer and use it in GitHub Desktop.
rake deploy
# 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