【发布时间】:2015-05-11 03:59:38
【问题描述】:
有没有办法在 Capistrano3 中设置当前路径文件夹。
我可以看到它现在是 Capistrano::DSL::Paths 模块的一部分,但我不知道如何更改它。
【问题讨论】:
标签: capistrano3
有没有办法在 Capistrano3 中设置当前路径文件夹。
我可以看到它现在是 Capistrano::DSL::Paths 模块的一部分,但我不知道如何更改它。
【问题讨论】:
标签: capistrano3
我用这样的方法解决了这个问题
set :current_path, "/somecurrentpathyouwant"
namespace :deploy do
desc "Create symlink to configured current path"
task :create_symlink do
on roles(:all) do
execute "rm -f #{fetch(:current_path)} && ln -s #{release_path} #{fetch(:current_path)}"
end
end
end
after :deploy, "deploy:create_symlink"
【讨论】: