aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-03-11 12:21:53 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-03-11 12:21:53 +0300
commit1ace16e799c1ff43a6f67947be2506c2f83857a1 (patch)
tree40537d56dab74336bfbb1d70e6f1fc3345cca893
parentf0a917c990c93668b7c1ca814340f3405054a707 (diff)
use path to git from env variable for git_pull_recursive
-rw-r--r--launch.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/launch.py b/launch.py
index 8cbf1ca5..0868f8a9 100644
--- a/launch.py
+++ b/launch.py
@@ -161,15 +161,17 @@ def git_clone(url, dir, name, commithash=None):
if commithash is not None:
run(f'"{git}" -C "{dir}" checkout {commithash}', None, "Couldn't checkout {name}'s hash: {commithash}")
+
def git_pull_recursive(dir):
for subdir, _, _ in os.walk(dir):
if os.path.exists(os.path.join(subdir, '.git')):
try:
- output = subprocess.check_output(['git', '-C', subdir, 'pull', '--autostash'])
+ output = subprocess.check_output([git, '-C', subdir, 'pull', '--autostash'])
print(f"Pulled changes for repository in '{subdir}':\n{output.decode('utf-8').strip()}\n")
except subprocess.CalledProcessError as e:
print(f"Couldn't perform 'git pull' on repository in '{subdir}':\n{e.output.decode('utf-8').strip()}\n")
+
def version_check(commit):
try:
import requests