From 299f6dd9b2319fafe8e04bc76c456d51819f6a58 Mon Sep 17 00:00:00 2001 From: laily Date: Mon, 12 Oct 2026 13:26:35 +0800 Subject: [PATCH] fix(builder): detect platform tracks independently --- skills/builder/references/contract.md | 3 ++- skills/builder/scripts/check.py | 9 +++++++-- skills/tester/scripts/resolve_agent.py | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/skills/builder/references/contract.md b/skills/builder/references/contract.md index 08d3534..ecd8f5f 100644 --- a/skills/builder/references/contract.md +++ b/skills/builder/references/contract.md @@ -55,7 +55,8 @@ make -f makefile.builder 规则: -1. 项目有 DEB 产物的判据:`makefile.builder` 配方引用 `dpkg-deb`/`debuild` 或产出 `.deb`。 +1. 项目有 DEB 产物的判据:`makefile.builder` 配方以独立命令调用 `dpkg-deb`/`debuild` 或产出 `.deb`; + 不能把 `xcodebuild` 中包含的字符误判成 `debuild`。 有镜像的判据:项目根存在 `Dockerfile`。 Android 判据:配方产出 `.apk` / `.aab`。iOS 判据:配方产出 `.ipa`。 拷贝发布判据:配方调用 `copy_artifact.sh`。`copy_artifact.sh` 是稳定入口,具体分发可由 diff --git a/skills/builder/scripts/check.py b/skills/builder/scripts/check.py index 379efe8..734754b 100755 --- a/skills/builder/scripts/check.py +++ b/skills/builder/scripts/check.py @@ -228,7 +228,8 @@ def check_build_has_no_upload(report: Report, project: Path) -> None: def detect_deb_project(recipe_all: str, project: Path) -> bool: - return ".deb" in recipe_all or "dpkg-deb" in recipe_all or "debuild" in recipe_all or any(project.glob("debian/*")) + has_deb_command = re.search(r"(? None: @@ -301,7 +302,11 @@ def check_mobile_recipe( report: Report, project: Path, *, kind: str, number: int, ext: str ) -> None: target = "build" - dry = run_make(project, "build") + if kind == "ios": + ios_probe = run_make(project, "ios") + if not has_no_rule(ios_probe): + target = "ios" + dry = run_make(project, target) text = chr(10).join(clean_make_output(dry)) problems = [] if dry.returncode != 0: diff --git a/skills/tester/scripts/resolve_agent.py b/skills/tester/scripts/resolve_agent.py index b6b09bf..14a7339 100755 --- a/skills/tester/scripts/resolve_agent.py +++ b/skills/tester/scripts/resolve_agent.py @@ -180,7 +180,7 @@ def clean_config(config: dict[str, Any]) -> dict[str, Any]: def config_from_binding(root: Path, selector: str) -> dict[str, Any]: """Materialize a common agent-runtime tester binding for legacy local.yaml.""" - runtime_path = Path(__file__).resolve().parents[2] / "skills" / "agent-runtime" / "scripts" / "agent.py" + runtime_path = Path(__file__).resolve().parents[3] / "skills" / "agent-runtime" / "scripts" / "agent.py" if not runtime_path.is_file(): raise RuntimeError(f"找不到共享 agent-runtime: {runtime_path}") spec = importlib.util.spec_from_file_location("pouch_agent_runtime", runtime_path)