mirror of
https://github.com/kp2pml30/git-third-party.git
synced 2026-02-16 23:54:41 +04:00
feat: allow to specify needed submodules
This commit is contained in:
parent
9ba7b15eee
commit
4e6cc662a7
1 changed files with 5 additions and 1 deletions
|
|
@ -67,7 +67,11 @@ def _update_at(name: str) -> None:
|
|||
subprocess.run(['git', 'fetch', 'origin', '--depth=1', conf['commit']], check=True, cwd=target_dir)
|
||||
subprocess.run(['git', 'checkout', conf['commit']], check=True, cwd=target_dir)
|
||||
subprocess.run(['git', 'submodule', 'update', '--init', '--recursive', '--depth', '1'], check=True, cwd=target_dir)
|
||||
subprocess.run(['git', 'submodule', 'update', '--recursive', '--depth', '1'], check=True, cwd=target_dir)
|
||||
submodules = conf.get('submodules', None)
|
||||
if submodules is None:
|
||||
subprocess.run(['git', 'submodule', 'update', '--recursive', '--depth', '1'], check=True, cwd=target_dir)
|
||||
elif len(submodules) != 0:
|
||||
subprocess.run(['git', 'submodule', 'update', '--recursive', '--depth', '1', '--'] + submodules, check=True, cwd=target_dir)
|
||||
# apply patches
|
||||
patches_dir = _get_patches_dir(name)
|
||||
patch_files = [patches_dir.joinpath(str(i)) for i in range(1, conf['patches'] + 1)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue