Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone submodules after the checkout #608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lib/omnibus/fetchers/git_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def fetch
else
force_recreate_project_dir! unless dir_empty?(project_dir)
git_clone
git_checkout
git_clone_submodules if clone_submodules?
end
end

Expand Down Expand Up @@ -141,7 +143,16 @@ def cloned?
# @return [void]
#
def git_clone
git("clone#{" --recursive" if clone_submodules?} #{source_url} .")
git("clone #{source_url} .")
end

#
# Clone the +source_url+ into the +project_dir+.
#
# @return [void]
#
def git_clone_submodules
git("submodule update --init --recursive")
end

#
Expand Down