Skip to content

Instantly share code, notes, and snippets.

@sdball
Created Jan 23, 2013
Embed
What would you like to do?
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