Skip to content

Commit ee5a619

Browse files
committed
chg: [auto-update] update submodules
1 parent ca10081 commit ee5a619

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

bin/Update.py

+14
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ def auto_update_enabled(cfg):
3535
else:
3636
return False
3737

38+
def update_submodule():
39+
process = subprocess.run(['git', 'submodule', 'update'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
40+
if process.returncode == 0:
41+
res = process.stdout.decode()
42+
print(res)
43+
print(f'{TERMINAL_YELLOW}Submodules Updated{TERMINAL_DEFAULT}')
44+
print()
45+
else:
46+
print('Error updating submodules:')
47+
print(f'{TERMINAL_RED}{process.stderr.decode()}{TERMINAL_DEFAULT}')
48+
print()
49+
50+
3851
# check if files are modify locally
3952
def check_if_files_modified():
4053
# return True
@@ -448,6 +461,7 @@ def aborting_update():
448461
manual_update = args.manual
449462

450463
if auto_update_enabled(cfg) or manual_update:
464+
update_submodule()
451465
if check_if_files_modified():
452466
is_fork = repo_is_fork()
453467
if is_fork:

0 commit comments

Comments
 (0)