Update submodule config
This commit is contained in:
parent
94f94260ac
commit
26f5fefac6
4 changed files with 5 additions and 18 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
|
@ -1,6 +1,7 @@
|
|||
[submodule "KiCAD-libs"]
|
||||
path = KiCAD-libs
|
||||
url = git@github.com:Jan--Henrik/KiCAD-libs.git
|
||||
noref = true
|
||||
[submodule "fw/hid-dials/upstream/st-usb-device"]
|
||||
path = fw/hid-dials/upstream/st-usb-device
|
||||
url = https://github.com/STMicroelectronics/stm32_mw_usb_device
|
||||
|
|
@ -12,4 +13,5 @@
|
|||
url = https://github.com/STMicroelectronics/cmsis_device_f0
|
||||
[submodule "fw/hid-dials/upstream/cmsis-core"]
|
||||
path = fw/hid-dials/upstream/cmsis-core
|
||||
url = https://github.com/STMicroelectronics/cmsis_core
|
||||
url = https://git.jaseg.de/straumli/pub/st-cmsis-core-lowfat.git
|
||||
branch = master-subtree-include
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit f0fc4b1219243143b722bb6ae9a1cd757c805d53
|
||||
Subproject commit 63265020429ce78dfc09df887e27c70b6b048eda
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 96d6da4e252b06dcfdc041e7df23e86161c33007
|
||||
Subproject commit 84a7bf753760ad7442d8762d2780560e6a734d96
|
||||
|
|
@ -58,16 +58,6 @@ def get_global_cachedir(create=False, verbose=False):
|
|||
os.makedirs(le_path, exist_ok=True)
|
||||
return le_path
|
||||
|
||||
def splitdir_run(repo, spec):
|
||||
source_branch, target_branch, prefix = spec.split(':')
|
||||
with tempfile.TemporaryDirectory(prefix='sm-split-') as tmpdir:
|
||||
try:
|
||||
# --force to prevent errors for existing checkouts
|
||||
subprocess.run('git worktree add --force'.split() + [tmpdir, source_branch], check=True, cwd=repo)
|
||||
subprocess.run('git subtree split'.split() + ['-b', target_branch, '--prefix', prefix], check=True, cwd=tmpdir)
|
||||
finally:
|
||||
subprocess.run('git worktree remove'.split() + [tmpdir], check=True, cwd=repo)
|
||||
|
||||
if __name__ == '__main__':
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser()
|
||||
|
|
@ -83,8 +73,6 @@ if __name__ == '__main__':
|
|||
for cfg_id, (url, le_path) in list_submodules().items():
|
||||
short_id = cfg_id.split('/')[-1]
|
||||
refdir = path.join(cachedir, short_id)
|
||||
branch = get_submodule_prop(cfg_id, 'branch')
|
||||
splitdir = get_submodule_prop(cfg_id, 'splitdir')
|
||||
if not path.isdir(refdir):
|
||||
print(f'Submodule {short_id} is not cached. Cloning from {url}...')
|
||||
subprocess.run('git clone --bare'.split() + quiet_opts + [url, refdir], check=True)
|
||||
|
|
@ -100,9 +88,6 @@ if __name__ == '__main__':
|
|||
|
||||
subprocess.run('git fetch'.split() + force_opts, cwd=refdir, check=True)
|
||||
|
||||
if splitdir:
|
||||
splitdir_run(refdir, splitdir)
|
||||
|
||||
print(f'Checking out submodule {short_id}...')
|
||||
subprocess.run('git submodule update --init --reference'.split() + [refdir, le_path])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue