Task: after_update_code is deprecated ... what is the new way of writing this

So, I use this as my current after_update

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

But when deploying, I get this error message

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

I looked and tried to write this

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

but Capistrano simply ignored him. What is the correct way to upgrade?

+3
source share
1 answer

Please note that "see" is not used. (Guh. It's always hard to find documentation on capistrano.) 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

It looks like you need to fully qualify the task name.

+8
source

All Articles