this recent thread के अनुसार, Capistrano init और अपने submodules अद्यतन करने के लिए सक्षम होना चाहिए:
set :git_enable_submodules,1
config में/deploy.rb पर्याप्त होना चाहिए, अपने .gitmodules
प्रविष्टियों तारीख तक कर रहे हैं।
यह सुनिश्चित करने के लिए कि आपके submodules शामिल हो, आपको to patch Capistrano (lib/capistano/recipes/deploy/scm/git.rb
) की आवश्यकता हो सकती है।
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
आप nested submodules है, तो आप की जरूरत है:
gem sources -a http://gems.github.com
$ sudo gem install morhekil-capistrano-deepmodules
बस अपने तैनाती config में यह आवश्यकता होती है:
की आवश्यकता होती है 'Capistrano/deepmodules'
मणि स्वचालित रूप से बाकी सभी का ख्याल रखेगा।
आप अपनी कॉन्फ़िगरेशन से :git_enable_submodules
हटा सकते हैं, मणि इसका कोई ध्यान नहीं देता है - अगर आपको इसकी आवश्यकता हो रही है तो आप पहले ही कह रहे हैं कि आप सबमिड्यूल सक्षम करना चाहते हैं।
और ध्यान देने के लिए एक और विवरण - फिलहाल रिमोट कैश रणनीति मणि द्वारा समर्थित है। इसका मतलब है कि आप अपने config
निम्न पंक्ति को जोड़ना होगा:
set :deploy_via, :remote_cache
यह रिमोट कैश सक्षम बनाता है और यह वास्तव में बात यह है कि तुम वैसे भी क्या करना चाहते है - submodules और अन्य बहुत से बड़े codebases की तैनाती यदि आपके पास कोई सर्वर-साइड कैश नहीं है तो सामान वास्तव में एक परेशानी का अनुभव है।