this recent thread göre, capistrano senin submodules init ve güncellemek gerekir: En .gitmodules
girişleri güncel olup olmadığını config
set :git_enable_submodules,1
/deploy.rb, yeterli olmalı.
Alt modüllerin de dahil edilmesini sağlamak için to patch Capistrano (lib/capistano/recipes/deploy/scm/git.rb
)'a ihtiyacınız olabilir. Eğer nested submodules varsa
def checkout(revision, destination)
git = command
branch = head
fail "No branch specified, use for example 'set :branch, \"origin/master\"' in your deploy.rb" unless branch
if depth = configuration[:git_shallow_clone]
execute = "#{git} clone --depth #{depth} #{configuration[:repository]} #{destination} && "
else
execute = "#{git} clone #{configuration[:repository]} #{destination} && "
end
execute += "cd #{destination} && #{git} checkout -b deploy #{branch}"
if submodules = configuration[:git_enable_submodules]
execute += " && git-submodule init &&"
execute += "git-submodule update"
end
execute
end
şunlar gereklidir:
gem sources -a http://gems.github.com
$ sudo gem install morhekil-capistrano-deepmodules
Sadece dağıtım yapılandırma anda buna ihtiyacı:
gerektirir 'capistrano/deepmodules'
Mücevher tüm kalanları otomatik olarak halledecektir. Eğer yapılandırmasındaki :git_enable_submodules
silebilirsiniz
, mücevher buna hiçbir önem veriyor - bunu gerektiren eğer Zaten alt modüllerini etkinleştirmek istediğinizi söylüyorsunuz. sadece uzaktan önbellek strateji taş tarafından desteklenen anda -
Ve bir ayrıntı dikkat etmek. Bu sizin config
aşağıdaki satırı eklemek ZORUNLU anlamına gelir:
set :deploy_via, :remote_cache
Uzak önbellek sağlayan ve gerçekten yine yapmak istiyorum şey - Altmodüllerin ve diğer bir çok büyük codebases dağıtma sunucu tarafı önbelleğiniz yoksa, gerçekten sorunlu bir deneyim. başlıbaşına