Skip to content

Commit 47d0ced

Browse files
committed
fix(ci): follow canonical input guard in release contract
1 parent 645721c commit 47d0ced

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎tests/test_release_gate_chain_contract.sh‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,19 @@ if not re.search(r"^ default: true$", option_body("hold_for_external_qual
389389
if "(-[0-9A-Za-z.-]+)?$" not in blocks.get("preflight", ""):
390390
failures.append("release.yml: preflight must accept hyphenated semver prereleases (v0.12.0-cli-rc.1)")
391391
pre = blocks.get("preflight", "")
392+
validation_path = "scripts/ci/validate-release-inputs.sh"
393+
if f"run: bash {validation_path}" not in pre:
394+
failures.append("preflight: must invoke the canonical release input guard")
395+
validation = pathlib.Path(sys.argv[1]).parents[2] / validation_path
396+
validation_text = validation.read_text() if validation.is_file() else ""
392397
for fragment in (
393398
"publish_github_prerelease requires a prerelease (hyphenated) version",
394399
"publish_github_prerelease cannot be combined with publish_registries",
395400
"publish_github_prerelease cannot be combined with hold_for_external_qualification",
396401
"platforms=linux has no Windows archive to qualify",
397402
"platforms=linux cannot publish registry packages",
398403
):
399-
if fragment not in pre:
404+
if fragment not in validation_text:
400405
failures.append(f"preflight: invalid-combination rejection missing: {fragment}")
401406
for job in ("test", "build", "smoke", "soak"):
402407
if "platforms: ${{ inputs.platforms }}" not in blocks.get(job, ""):

0 commit comments

Comments
 (0)