Skip to content

Commit

Permalink
chg: [auto-update] update submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 30, 2025
1 parent ca10081 commit ee5a619
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bin/Update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ee5a619

Please sign in to comment.