Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/ci-changes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 16 additions & 0 deletions scripts/ci-changes.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading