Created
April 1, 2011 11:29
-
-
Save thattommyhall/898017 to your computer and use it in GitHub Desktop.
Testing before/after in Cap
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
def method_in_deploy | |
puts "METHOD IN DEPLOY" | |
end | |
task :task_in_deploy do | |
puts "TASK IN DEPLOY" | |
end | |
task :do_before do | |
puts "BEFORE" | |
end | |
task :do_after do | |
puts "AFTER" | |
end | |
namespace :deploy do | |
method_in_deploy | |
task_in_deploy | |
task(:start) {} | |
task(:stop) {} | |
desc "Restart Application" | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
run "touch #{current_path}/tmp/restart.txt" | |
end | |
end | |
before :deploy, :do_before | |
after :deploy, :do_after |
Author
thattommyhall
commented
Apr 1, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment