Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7ab774

Browse files
Paul Bakausclaude
andcommitted
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) <[email protected]>
1 parent 8e3d4d2 commit f7ab774

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/release.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,12 @@ if (remoteTags.split('\n').some((line) => line.endsWith(`refs/tags/${tag}`))) {
149149
ok('tag is free');
150150

151151
step(`Extracting changelog entry for "${cfg.changelogLabel}${version}"`);
152-
const indexHtml = readFileSync(path.join(repoRoot, 'public/index.html'), 'utf8');
152+
const changelogSource = path.join(repoRoot, 'site/pages/index.astro');
153+
const indexHtml = readFileSync(changelogSource, 'utf8');
153154
const expectedHeader = `<span class="changelog-version">${cfg.changelogLabel}${version}</span>`;
154155
const headerIdx = indexHtml.indexOf(expectedHeader);
155156
if (headerIdx === -1) {
156-
fail(`No changelog entry found for "${cfg.changelogLabel}${version}" in public/index.html. Add one before releasing.`);
157+
fail(`No changelog entry found for "${cfg.changelogLabel}${version}" in site/pages/index.astro. Add one before releasing.`);
157158
}
158159
const entryStart = indexHtml.lastIndexOf('<div class="changelog-entry"', headerIdx);
159160
const ulEnd = indexHtml.indexOf('</ul>', headerIdx);

0 commit comments

Comments
 (0)