开发者

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

开发者 https://www.devze.com 2023-02-18 00:27 出处:网络
So I\'m using this as my current after_update task :after_update_code, :roles => :app do do_something

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 开发者_StackOverflow社区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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号