(1)如何自动清理老的release
capistrano 部署后自动清理老 release,默认只保留 5 个 releases
添加下面代码到 config/deploy.rb # if you want to clean up old releases on each deploy uncomment this: after "deploy:restart", "deploy:cleanup"
(2)如何人指定保留数量
如果想制定具体保留几个releases文件夹,设置保留数量,在 config/deploy.rb 中添加如下代码
set :keep_releases, 15
以上代码的含义是保留15次部署的releases
capistrano 部署后自动清理之前的release,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/iwangzheng/p/3926558.html