chore: initialize from frontend template 4dc033c
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
|
||||
import {
|
||||
RELEASE_CANDIDATE_MANIFEST_PATH,
|
||||
verifyReleaseCandidate,
|
||||
} from "./lib/release-candidate.ts";
|
||||
|
||||
let document: unknown = null;
|
||||
try {
|
||||
document = JSON.parse(
|
||||
await readFile(RELEASE_CANDIDATE_MANIFEST_PATH, "utf8"),
|
||||
);
|
||||
} catch {
|
||||
// The verifier reports a single fail-closed schema error below.
|
||||
}
|
||||
const result = await verifyReleaseCandidate(document);
|
||||
if (result.failures.length > 0) {
|
||||
process.stderr.write(
|
||||
`Release candidate verification failed:\n- ${result.failures.join("\n- ")}\n`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
process.stdout.write(
|
||||
`Release candidate verification: PASS (${result.manifest!.distSha256})\n`,
|
||||
);
|
||||
Reference in New Issue
Block a user