diff --git a/scripts/ci-changes.mjs b/scripts/ci-changes.mjs index 3e343ee2a67..f94e7abbcb3 100644 --- a/scripts/ci-changes.mjs +++ b/scripts/ci-changes.mjs @@ -162,6 +162,14 @@ export function classifyFiles(files, { releasePlease = false } = {}) { continue; } + // Aplite has an independent release manifest. Its release notes and + // manifest need repository-policy checks, not a product rebuild. Keep + // source, Cargo.toml and Cargo.lock changes on their normal paths below. + if ([".release-please-aplite-manifest.json", "crates/aplite/CHANGELOG.md"].includes(path)) { + affected.scripts = true; + continue; + } + if (isRustOnlyPath(path)) { affected.rust = true; continue; diff --git a/scripts/ci-changes.test.mjs b/scripts/ci-changes.test.mjs index 42b42f7e884..8c75eaf8ab2 100644 --- a/scripts/ci-changes.test.mjs +++ b/scripts/ci-changes.test.mjs @@ -70,6 +70,22 @@ test("Rust test infrastructure skips bindings while retaining Rust checks", () = } }); +test("Aplite release metadata runs policy checks without rebuilding products", () => { + const metadata = [".release-please-aplite-manifest.json", "crates/aplite/CHANGELOG.md"]; + for (const files of [metadata, ...metadata.map(path => [path])]) { + for (const releasePlease of [false, true]) + assert.deepEqual(classifyFiles(files, { releasePlease }), { ...none, scripts: true }); + } + for (const path of ["crates/aplite/src/lib.rs", "crates/aplite/Cargo.toml", "Cargo.lock"]) { + assert.deepEqual( + classifyFiles([...metadata, path]), + { ...classifyFiles([path]), scripts: true }, + path, + ); + assert.equal(classifyFiles([...metadata, path]).rust, true, path); + } +}); + test("manifests and mixed runtime changes retain binding validation", () => { for (const path of [ "Cargo.toml",