【发布时间】:2014-02-05 22:36:20
【问题描述】:
Here 是一个教程如何将参数传递给 capistrano 3 任务。
namespace :task do
desc 'Execute the specific cmd task'
task :invoke, :command do |task, args|
on roles(:app) do
execute :cmd, args[:command]
end
end
end
可以执行:
$ cap staging "task:invoke[arg]"
如何在我的 deploy.rb 中使用它?以下不起作用。
before :started, "task:invoke[arg]"
【问题讨论】: