diff --git a/CHANGELOG.md b/CHANGELOG.md index e916e3f2f..409e150cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Unreleased -# v0.27.0 (2024-11-27) +## v0.27.0 (2024-11-27) ### Breaking Changes diff --git a/scripts/create_release.js b/scripts/create_release.js index 3d9800fed..c1b660a2b 100644 --- a/scripts/create_release.js +++ b/scripts/create_release.js @@ -83,8 +83,7 @@ async function main() { console.log("Updating changelog..."); let fullChangelog = await readFile(CHANGELOG_MD, "utf-8"); - const heading = patch === "0" ? "#" : "##"; - let start = fullChangelog.indexOf(`${heading} ${currentVersion}`); + let start = fullChangelog.indexOf(`## ${currentVersion}`); // If this version isn't in the changelog yet, take everything under ## Unreleased and include that // as this version. @@ -104,9 +103,9 @@ async function main() { ].join("-"); fullChangelog = "## Unreleased\n\n" + - `${heading} ${currentVersion} (${dateStr})` + + `## ${currentVersion} (${dateStr})` + fullChangelog.substring(start); - start = fullChangelog.indexOf(`${heading} ${currentVersion}`); + start = fullChangelog.indexOf(`## ${currentVersion}`); await writeFile(CHANGELOG_MD, fullChangelog); await exec(`git add "${CHANGELOG_MD}"`);