Created
January 23, 2013 21:35
-
-
Save sdball/4613776 to your computer and use it in GitHub Desktop.
Example capistrano task to confirm deployment
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
# 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