Seeded claude design
This commit is contained in:
commit
9419f166ce
32 changed files with 2553 additions and 0 deletions
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");
|
||||
Loading…
Add table
Add a link
Reference in a new issue