From 24fb9b1296d7bb5942ef5690ee3a806856b18dae Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 17 Apr 2026 22:53:19 -0400 Subject: fix: stop rewriting dev during release publish (#22982) --- script/version.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'script/version.ts') diff --git a/script/version.ts b/script/version.ts index 3ca4f661d..c1ad021b6 100755 --- a/script/version.ts +++ b/script/version.ts @@ -4,9 +4,9 @@ import { Script } from "@opencode-ai/script" import { $ } from "bun" const output = [`version=${Script.version}`] +const sha = process.env.GITHUB_SHA ?? (await $`git rev-parse HEAD`.text()).trim() if (!Script.preview) { - const sha = process.env.GITHUB_SHA ?? (await $`git rev-parse HEAD`.text()).trim() await $`bun script/changelog.ts --to ${sha}`.cwd(process.cwd()) const file = `${process.cwd()}/UPCOMING_CHANGELOG.md` const body = await Bun.file(file) @@ -15,12 +15,12 @@ if (!Script.preview) { const dir = process.env.RUNNER_TEMP ?? "/tmp" 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}` + await $`gh release create v${Script.version} -d --target ${sha} --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}`) } else if (Script.channel === "beta") { - await $`gh release create v${Script.version} -d --title "v${Script.version}" --repo ${process.env.GH_REPO}` + await $`gh release create v${Script.version} -d --target ${sha} --title "v${Script.version}" --repo ${process.env.GH_REPO}` const release = await $`gh release view v${Script.version} --json tagName,databaseId --repo ${process.env.GH_REPO}`.json() output.push(`release=${release.databaseId}`) -- cgit v1.2.3