2

我使用虚拟 SCM 和复制策略来部署我的 Rails 3 应用程序。为了让它更快,我想从副本中排除一些文件(例如日志)。我在我的设置以下选项config/deploy.rb

set :scm, :none 
set :deploy_via, :copy
set :copy_exclude, "**/*.log"

但是,它似乎在部署期间复制了日志。我做错了什么?

4

2 回答 2

0

https://github.com/capistrano/capistrano/blob/v2.15.4/lib/capistrano/recipes/deploy/scm/none.rb As can be seen from the source, the copy_exclude setting is not respected when using :scm none

于 2013-09-02T08:30:10.567 回答
0

参考:http ://weblog.jamisbuck.org/2008/5/2/capistrano-2-3-0.html

对于 Capistrano 2,您应该使用 copy_exclude:

set :repository, "."
set :scm, :none
set :deploy_via, :copy
set :copy_exclude, ['tmp', 'log']

对于 Capistrano 3,(使用 gem:capistrano-scm-copy),请参见:(https://github.com/wercker/capistrano-scm-copy/issues/6

set :exclude_dir, "deploy"
于 2018-06-09T11:20:46.503 回答