Update update_script.py

This commit is contained in:
Saifeddine ALOUI 2023-10-16 08:59:01 +02:00 committed by GitHub
parent 9a5fd40cb2
commit e6ffc49059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,10 @@ def run_git_pull():
print("Updating submodules")
try:
repo.git.submodule('update', '--init', '--recursive')
# Checkout the main branch on each submodule
for submodule in repo.submodules:
submodule_repo = submodule.module()
submodule_repo.git.checkout('main')
except:
print("Couldn't update submodules")
return True