Skip to content

Instantly share code, notes, and snippets.

@sdball
Created January 23, 2013 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdball/4613776 to your computer and use it in GitHub Desktop.
Save sdball/4613776 to your computer and use it in GitHub Desktop.
Example capistrano task to confirm deployment
# drop this task in the environment(s) you want to confirm deployment for
before :deploy, "deploy:confirm"
namespace :deploy do
desc "Should we really deploy?"
task :confirm do
if Capistrano::CLI.ui.ask("Are you sure?") == "yes"
puts "You got it buddy. Imma deploy now."
else
puts "Whoa whoa whoa! Ok. Good thing I asked!"
puts "Stopping!"
exit
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment