fix(release): read changelog from site/pages/index.astro after Astro migration

The release script still pointed at public/index.html, which the Astro
migration deleted. The changelog lives in site/pages/index.astro now.
The substring extraction logic works unchanged because the source
contains the same markup that the build emits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-05-04 08:37:48 -07:00
co-authored by Claude Opus 4.7
parent 8e3d4d2b04
commit f7ab774fe4
+3 -2
View File
@@ -149,11 +149,12 @@ if (remoteTags.split('\n').some((line) => line.endsWith(`refs/tags/${tag}`))) {
ok('tag is free');
step(`Extracting changelog entry for "${cfg.changelogLabel}${version}"`);
const indexHtml = readFileSync(path.join(repoRoot, 'public/index.html'), 'utf8');
const changelogSource = path.join(repoRoot, 'site/pages/index.astro');
const indexHtml = readFileSync(changelogSource, 'utf8');
const expectedHeader = `<span class="changelog-version">${cfg.changelogLabel}${version}</span>`;
const headerIdx = indexHtml.indexOf(expectedHeader);
if (headerIdx === -1) {
fail(`No changelog entry found for "${cfg.changelogLabel}${version}" in public/index.html. Add one before releasing.`);
fail(`No changelog entry found for "${cfg.changelogLabel}${version}" in site/pages/index.astro. Add one before releasing.`);
}
const entryStart = indexHtml.lastIndexOf('<div class="changelog-entry"', headerIdx);
const ulEnd = indexHtml.indexOf('</ul>', headerIdx);