Created
July 1, 2009 21:52
-
-
Save BJClark/139096 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
task :deploy, :roles => :live_web do | |
set(:deploy_tag) do | |
Capistrano::CLI.ui.ask "Tag to deploy to: " | |
end | |
die 'Tag must be longer than 4 characters' unless deploy_tag.length > 4 | |
`cd #{RAILS_ROOT} && ruby vendor/plugins/newrelic_rpm/bin/newrelic_cmd deployments -e production -r #{deploy_tag}` | |
do_deploy | |
end | |
serial_task :do_deploy, :roles => :live_web do | |
. . . | |
checkout(deploy_tag) | |
. . . | |
end | |
def checkout(tag) | |
run "cd #{COMPOSTUS_DIR}; git fetch", &git_stream_handler(self) | |
run "cd #{COMPOSTUS_DIR}; git checkout #{tag};", &git_stream_handler(self) | |
end | |
(git_stream_handler isn't necessary anymore, but we haven't removed it yet.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment