【问题标题】:How to set current_path in Capistrano 3如何在 Capistrano 3 中设置 current_path
【发布时间】:2015-05-11 03:59:38
【问题描述】:

有没有办法在 Capistrano3 中设置当前路径文件夹。

我可以看到它现在是 Capistrano::DSL::Paths 模块的一部分,但我不知道如何更改它。

【问题讨论】:

    标签: capistrano3


    【解决方案1】:

    我用这样的方法解决了这个问题

    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"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-30
      • 1970-01-01
      相关资源
      最近更新 更多