mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-02-07 09:56:24 +00:00
chg: [auto-update] update submodules
This commit is contained in:
parent
ca100814e5
commit
ee5a6197f4
1 changed files with 14 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue