我使用 Capistrano 来部署我的 Rails 应用程序。如何写出部署到 public_html/revision.txt 的 git 修订版?
最佳答案
如果其他人必须这样做:
namespace :deploy do
# ...
desc "Write the current version to public_html/revision.txt"
task :write_revision, :except => { :no_release => true } do
run "cd #{latest_release}; git rev-parse HEAD > #{latest_release}/public/revision.txt"
end
# ...
end
after "deploy:update_code", "deploy:write_revision"
关于git - 如何将部署的 git 修订写出到 Capistrano 中的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12324594/