summaryrefslogtreecommitdiffhomepage
path: root/script
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-03-24 18:24:34 -0400
committerDax Raad <[email protected]>2026-03-24 18:24:34 -0400
commit35884defd8940016ee22e02c1dcb343d48446628 (patch)
treedb12f85e72dff3d1fb75c4176b089a907c4b69a0 /script
parent15dc33d1a38f3beb30fdc1a2bd2a0f3dd124a3a8 (diff)
downloadopencode-35884defd8940016ee22e02c1dcb343d48446628.tar.gz
opencode-35884defd8940016ee22e02c1dcb343d48446628.zip
ci
Diffstat (limited to 'script')
-rwxr-xr-xscript/version.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/script/version.ts b/script/version.ts
index 71619f461..7bed6d3a9 100755
--- a/script/version.ts
+++ b/script/version.ts
@@ -2,18 +2,19 @@
import { Script } from "@opencode-ai/script"
import { $ } from "bun"
-import { buildNotes, getLatestRelease } from "./changelog"
const output = [`version=${Script.version}`]
if (!Script.preview) {
- const previous = await getLatestRelease()
- const notes = await buildNotes(previous, "HEAD")
- const body = notes.join("\n") || "No notable changes"
+ await $`opencode run --command changelog`.cwd(process.cwd())
+ const file = `${process.cwd()}/UPCOMING_CHANGELOG.md`
+ const body = await Bun.file(file)
+ .text()
+ .catch(() => "No notable changes")
const dir = process.env.RUNNER_TEMP ?? "/tmp"
- const file = `${dir}/opencode-release-notes.txt`
- await Bun.write(file, body)
- await $`gh release create v${Script.version} -d --title "v${Script.version}" --notes-file ${file}`
+ const notesFile = `${dir}/opencode-release-notes.txt`
+ await Bun.write(notesFile, body)
+ await $`gh release create v${Script.version} -d --title "v${Script.version}" --notes-file ${notesFile}`
const release = await $`gh release view v${Script.version} --json tagName,databaseId`.json()
output.push(`release=${release.databaseId}`)
output.push(`tag=${release.tagName}`)