chg: [auto-update] update submodules
Some checks are pending
CI / ail_test (3.9) (push) Waiting to run
CI / ail_test (3.10) (push) Waiting to run
CI / ail_test (3.7) (push) Waiting to run
CI / ail_test (3.8) (push) Waiting to run

This commit is contained in:
terrtia 2025-01-30 15:21:05 +01:00
parent ca100814e5
commit ee5a6197f4
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -35,6 +35,19 @@ def auto_update_enabled(cfg):
else:
return False
def update_submodule():
process = subprocess.run(['git', 'submodule', 'update'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if process.returncode == 0:
res = process.stdout.decode()
print(res)
print(f'{TERMINAL_YELLOW}Submodules Updated{TERMINAL_DEFAULT}')
print()
else:
print('Error updating submodules:')
print(f'{TERMINAL_RED}{process.stderr.decode()}{TERMINAL_DEFAULT}')
print()
# check if files are modify locally
def check_if_files_modified():
# return True
@ -448,6 +461,7 @@ if __name__ == "__main__":
manual_update = args.manual
if auto_update_enabled(cfg) or manual_update:
update_submodule()
if check_if_files_modified():
is_fork = repo_is_fork()
if is_fork: