This commit is contained in:
parent
fc5d587b96
commit
d305ee72b8
|
|
@ -321,6 +321,13 @@ class GitMonitor:
|
|||
if result.returncode != 0:
|
||||
Logger.warning(f"清理子模块失败,继续执行: {result.stderr}")
|
||||
|
||||
# 拉取所有子模块的最新代码
|
||||
Logger.info("拉取子模块最新代码...")
|
||||
cmd = "git submodule foreach 'git fetch origin && git checkout {branch} && git pull origin {branch}'".format(branch=self.global_branch)
|
||||
result = subprocess.run(cmd, shell=True, cwd=repo_path, capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
Logger.warning(f"拉取子模块失败,继续执行: {result.stderr}")
|
||||
|
||||
# 初始化和更新所有子模块到主仓库记录的版本
|
||||
Logger.info("更新子模块到主仓库记录的版本...")
|
||||
cmd = "git submodule update --init --recursive --force"
|
||||
|
|
|
|||
Loading…
Reference in New Issue