How do I invoke one Capistrano task from another?

后端 未结 5 1624
走了就别回头了
走了就别回头了 2021-02-03 17:38

How do I invoke one Capistrano task from another?

For example:

task :foo do
  # stuff
end

task :bar do
  # INVOKE :foo
end
5条回答
  •  不知归路
    2021-02-03 18:14

    For the record: in the Capistrano 3, use invoke(), e.g.

    desc "Task that does something"
    task :do_something do
      invoke 'namespace:task'
    end
    

    More at https://github.com/capistrano/capistrano#before--after

提交回复
热议问题