Skip to content

Commit

Permalink
base: Support submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
avdgrinten committed Mar 31, 2024
1 parent 00895d0 commit 87f6810
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xbstrap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2168,6 +2168,9 @@ def checkout_src(cfg, src, settings):
)
else:
subprocess.check_call(["git", "rebase", commit], cwd=src.source_dir)

if source.get("submodules", False):
subprocess.check_call(["git", "submodule", "update", "--init"], cwd=src.source_dir)
elif "hg" in source:
args = ["hg", "checkout"]
if "tag" in source:
Expand Down
2 changes: 2 additions & 0 deletions xbstrap/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ definitions:
type: string
'disable_shallow_fetch':
type: boolean
'submodules':
type: boolean
'regenerate': { $ref: '#/definitions/build_steps' }
'sources_required': { $ref: '#/definitions/source_deps' }
'tools_required': { $ref: '#/definitions/tool_deps' }
Expand Down

0 comments on commit 87f6810

Please sign in to comment.