Module: Capistrano::Git::SubmoduleStrategy
- Includes:
- DefaultStrategy
- Defined in:
- lib/capistrano/capistrano-git-submodule-strategy.rb
Instance Method Summary collapse
- #check ⇒ Object
- #clone ⇒ Object
-
#release ⇒ Object
put the working tree in a release-branch, make sure the submodules are up-to-date and copy everything to the release path.
- #test ⇒ Object
- #update ⇒ Object
Instance Method Details
#check ⇒ Object
12 13 14 |
# File 'lib/capistrano/capistrano-git-submodule-strategy.rb', line 12 def check test! :git, :'ls-remote', repo_url end |
#clone ⇒ Object
16 17 18 |
# File 'lib/capistrano/capistrano-git-submodule-strategy.rb', line 16 def clone git :clone, '-b', fetch(:branch), '--recursive', repo_url, repo_path end |
#release ⇒ Object
put the working tree in a release-branch, make sure the submodules are up-to-date and copy everything to the release path
27 28 29 30 31 |
# File 'lib/capistrano/capistrano-git-submodule-strategy.rb', line 27 def release git :checkout, fetch(:branch) git :submodule, :update, '--init', '--recursive' context.execute "rsync -ar --exclude=.git\* #{repo_path}/ #{release_path}" end |
#test ⇒ Object
8 9 10 |
# File 'lib/capistrano/capistrano-git-submodule-strategy.rb', line 8 def test test! " [ -d #{repo_path}/.git ] " end |
#update ⇒ Object
20 21 22 |
# File 'lib/capistrano/capistrano-git-submodule-strategy.rb', line 20 def update git :remote, :update end |