From d305ee72b895c31ef76d2cc73e9cb8ab17e0c619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Thu, 5 Feb 2026 16:51:35 +0800 Subject: [PATCH] xx --- .devops/monitor.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.devops/monitor.py b/.devops/monitor.py index eff66ca..df4c8c0 100644 --- a/.devops/monitor.py +++ b/.devops/monitor.py @@ -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"