Seeded claude design
This commit is contained in:
22
scripts/extract-release-notes.mjs
Normal file
22
scripts/extract-release-notes.mjs
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env node
|
||||
// Print the CHANGELOG slice for a given tag to stdout.
|
||||
// Used by the release workflow to attach release notes.
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
const tag = process.argv[2];
|
||||
if (!tag) {
|
||||
console.error("Usage: extract-release-notes.mjs vX.Y.Z");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const version = tag.replace(/^v/, "");
|
||||
const changelog = readFileSync("CHANGELOG.md", "utf8");
|
||||
const re = new RegExp(`## \\[${version.replace(/\./g, "\\.")}\\][\\s\\S]*?(?=\\n## \\[|$)`, "m");
|
||||
const m = changelog.match(re);
|
||||
|
||||
if (!m) {
|
||||
console.error(`No CHANGELOG section found for [${version}].`);
|
||||
process.exit(1);
|
||||
}
|
||||
process.stdout.write(m[0].trim() + "\n");
|
||||
Reference in New Issue
Block a user