Created
January 4, 2011 16:57
-
-
Save diasjorge/765032 to your computer and use it in GitHub Desktop.
Avoid empty deployments
This file contains hidden or 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
namespace :deploy do | |
task :check_changes do | |
if current_revision == real_revision | |
Capistrano::CLI.ui.say("You don't have any changes to deploy") | |
agree = Capistrano::CLI.ui.agree("Continue (Yes, [No]) ") do |q| | |
q.default = 'n' | |
end | |
exit unless agree | |
else | |
# current_revision depends on current_path | |
reset!(:current_path) | |
reset!(:current_revision) | |
reset!(:real_revision) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment