mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-30 17:14:40 +08:00
fix: read CHANGELOG with absolute path so release notes populate
The SDK build step imported earlier in publish.ts does process.chdir into packages/sdk/js and never restores it, so the relative path to packages/kilo-vscode/CHANGELOG.md later in the release block resolved to a missing file. The read silently fell through to an empty string and the GitHub release body ended up as the 'No notable changes' default even though the CHANGELOG in the release commit had all the entries. Resolve the path relative to this script via fileURLToPath so it works regardless of cwd.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"kilo-code": patch
|
||||
---
|
||||
|
||||
Fix GitHub release notes showing "No notable changes" when the CHANGELOG actually had entries for the version.
|
||||
+6
-2
@@ -105,9 +105,13 @@ if (Script.release) {
|
||||
// kilocode_change end
|
||||
|
||||
// kilocode_change start - mark prerelease GitHub releases accordingly
|
||||
// and populate release notes from the changelog updated by changeset above
|
||||
// and populate release notes from the changelog updated by changeset above.
|
||||
// Use an absolute path for the CHANGELOG because the imported SDK build
|
||||
// script chdirs into packages/sdk/js, so a relative path would miss the file
|
||||
// and fall through to the "No notable changes" default.
|
||||
const flags = Script.preview ? ["--draft=false", "--prerelease"] : ["--draft=false"]
|
||||
const changelog = await Bun.file("packages/kilo-vscode/CHANGELOG.md")
|
||||
const changelogPath = fileURLToPath(new URL("../packages/kilo-vscode/CHANGELOG.md", import.meta.url))
|
||||
const changelog = await Bun.file(changelogPath)
|
||||
.text()
|
||||
.catch(() => "")
|
||||
const body = extractLatestSection(changelog) || "No notable changes"
|
||||
|
||||
Reference in New Issue
Block a user