fix(ci): read p0 sources in runtime layout
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 14s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 14s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -45,7 +45,7 @@ def _enrich_source_presence(payload: dict[str, Any], repo_root: Path) -> None:
|
||||
for source in required_sources:
|
||||
item = _dict(source)
|
||||
relative_path = str(item.get("path") or "")
|
||||
present = bool(relative_path) and (repo_root / relative_path).is_file()
|
||||
present = bool(relative_path) and _source_present(repo_root, relative_path)
|
||||
item["present"] = present
|
||||
if present:
|
||||
present_ids.append(str(item.get("id") or relative_path))
|
||||
@@ -72,6 +72,18 @@ def _enrich_source_presence(payload: dict[str, Any], repo_root: Path) -> None:
|
||||
)
|
||||
|
||||
|
||||
def _source_present(repo_root: Path, relative_path: str) -> bool:
|
||||
if (repo_root / relative_path).is_file():
|
||||
return True
|
||||
|
||||
api_prefix = "apps/api/"
|
||||
if relative_path.startswith(api_prefix):
|
||||
runtime_relative_path = relative_path.removeprefix(api_prefix)
|
||||
return (repo_root / runtime_relative_path).is_file()
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _require_schema(payload: dict[str, Any], label: str) -> None:
|
||||
actual = payload.get("schema_version")
|
||||
if actual != _SCHEMA_VERSION:
|
||||
|
||||
Reference in New Issue
Block a user