From ee5a6197f48c397d94a0379e041b1705df25fc7c Mon Sep 17 00:00:00 2001 From: terrtia Date: Thu, 30 Jan 2025 15:21:05 +0100 Subject: [PATCH] chg: [auto-update] update submodules --- bin/Update.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/Update.py b/bin/Update.py index 892f2375..0d873e0e 100755 --- a/bin/Update.py +++ b/bin/Update.py @@ -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 @@ def aborting_update(): 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: