LoginSignup
16

More than 5 years have passed since last update.

capistrano3のtask内で別のtaskを呼ぶ方法

Last updated at Posted at 2014-05-28

capistrano2系だとfind_and_execute_taskってのがあったんだけど、3系では無くなってた。
どうするのかなーと調べたところ、invokeを使えばいいらしい。

README.mdにも書いてあった...

README.md
The final way to call out to other tasks is to simply `invoke()` them:

namespace :example do
  task :one do
    on roles(:all) { info "One" }
  end
  task :two do
    invoke "example:one"
    on roles(:all) { info "Two" }
  end
end

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16