Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

task :after_update_code is deprecated ... whats the new way of writing this

So I'm using this as my current after_update

task :after_update_code, :roles => :app do
    do_something
end

But on deploy I get this error message

 before_ and after_ is deprecated, please see the new before() and after() methods

I took a look and tried writing this

after :update_code, :roles => app do
    do_something
end

but Capistrano just ignored it. What is the right way to update this?

like image 455
concept47 Avatar asked Nov 24 '25 12:11

concept47


1 Answers

Notice how 'see' isn't 'use'. (Guh. It's always hard to find capistrano documentation.) https://github.com/leehambley/capistrano-handbook/blob/master/index.markdown http://weblog.jamisbuck.org/2007/5/11/capistrano-2-0-preview-2

after 'deploy:update_code' do
 #etc
end

Looks like you have to fully qualify the name of the task.

like image 190
Tim Snowhite Avatar answered Nov 26 '25 11:11

Tim Snowhite



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!