修改脚本
This commit is contained in:
parent
ed58b65d76
commit
25075805f2
|
|
@ -160,7 +160,14 @@ class GitMonitor:
|
|||
Logger.error("拉取主仓库失败")
|
||||
return False
|
||||
|
||||
# 更新所有子模块
|
||||
# 初始化和更新所有子模块(包括新增的子模块)
|
||||
cmd = "git submodule update --init --recursive"
|
||||
result = subprocess.run(cmd, shell=True, cwd=repo_path, capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
Logger.error("初始化子模块失败")
|
||||
return False
|
||||
|
||||
# 更新所有子模块到最新代码
|
||||
cmd = f"git submodule foreach 'git checkout {self.global_branch} && git pull'"
|
||||
result = subprocess.run(cmd, shell=True, cwd=repo_path, capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
|
|
|
|||
Loading…
Reference in New Issue