fix(builder): detect platform tracks independently
This commit is contained in:
@@ -55,7 +55,8 @@ make -f makefile.builder <target>
|
|||||||
|
|
||||||
规则:
|
规则:
|
||||||
|
|
||||||
1. 项目有 DEB 产物的判据:`makefile.builder` 配方引用 `dpkg-deb`/`debuild` 或产出 `.deb`。
|
1. 项目有 DEB 产物的判据:`makefile.builder` 配方以独立命令调用 `dpkg-deb`/`debuild` 或产出 `.deb`;
|
||||||
|
不能把 `xcodebuild` 中包含的字符误判成 `debuild`。
|
||||||
有镜像的判据:项目根存在 `Dockerfile`。
|
有镜像的判据:项目根存在 `Dockerfile`。
|
||||||
Android 判据:配方产出 `.apk` / `.aab`。iOS 判据:配方产出 `.ipa`。
|
Android 判据:配方产出 `.apk` / `.aab`。iOS 判据:配方产出 `.ipa`。
|
||||||
拷贝发布判据:配方调用 `copy_artifact.sh`。`copy_artifact.sh` 是稳定入口,具体分发可由
|
拷贝发布判据:配方调用 `copy_artifact.sh`。`copy_artifact.sh` 是稳定入口,具体分发可由
|
||||||
|
|||||||
@@ -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:
|
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"(?<![A-Za-z0-9_-])(?:dpkg-deb|debuild)(?![A-Za-z0-9_-])", recipe_all)
|
||||||
|
return ".deb" in recipe_all or has_deb_command is not None or any(project.glob("debian/*"))
|
||||||
|
|
||||||
|
|
||||||
def check_deb_recipe(report: Report, project: Path, built_deb: Path | None) -> None:
|
def check_deb_recipe(report: Report, project: Path, built_deb: Path | None) -> None:
|
||||||
@@ -301,7 +302,11 @@ def check_mobile_recipe(
|
|||||||
report: Report, project: Path, *, kind: str, number: int, ext: str
|
report: Report, project: Path, *, kind: str, number: int, ext: str
|
||||||
) -> None:
|
) -> None:
|
||||||
target = "build"
|
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))
|
text = chr(10).join(clean_make_output(dry))
|
||||||
problems = []
|
problems = []
|
||||||
if dry.returncode != 0:
|
if dry.returncode != 0:
|
||||||
|
|||||||
@@ -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]:
|
def config_from_binding(root: Path, selector: str) -> dict[str, Any]:
|
||||||
"""Materialize a common agent-runtime tester binding for legacy local.yaml."""
|
"""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():
|
if not runtime_path.is_file():
|
||||||
raise RuntimeError(f"找不到共享 agent-runtime: {runtime_path}")
|
raise RuntimeError(f"找不到共享 agent-runtime: {runtime_path}")
|
||||||
spec = importlib.util.spec_from_file_location("pouch_agent_runtime", runtime_path)
|
spec = importlib.util.spec_from_file_location("pouch_agent_runtime", runtime_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user