pull/11149/head
Dax Raad 2026-01-29 12:16:25 -05:00
parent f730ad508f
commit 5a1412cf0b
1 changed files with 9 additions and 11 deletions

View File

@ -4,10 +4,6 @@ import { $ } from "bun"
import { Script } from "@opencode-ai/script"
import { buildNotes, getLatestRelease } from "./changelog"
if (!Script.release) {
throw new Error("Missing OPENCODE_RELEASE environment variable")
}
const highlightsTemplate = `
<!--
Add highlights before publishing. Delete this section if no highlights.
@ -69,13 +65,15 @@ await Bun.file(extensionToml).write(toml)
await $`bun install`
await import(`../packages/sdk/js/script/build.ts`)
await $`git commit -am "release: v${Script.version}"`
await $`git tag v${Script.version}`
await $`git fetch origin`
await $`git cherry-pick HEAD..origin/dev`.nothrow()
await $`git push origin HEAD --tags --no-verify --force-with-lease`
await new Promise((resolve) => setTimeout(resolve, 5_000))
await $`gh release edit v${Script.version} --draft --title "v${Script.version}" --notes ${notes.join("\n") || "No notable changes"}`
if (Script.release) {
await $`git commit -am "release: v${Script.version}"`
await $`git tag v${Script.version}`
await $`git fetch origin`
await $`git cherry-pick HEAD..origin/dev`.nothrow()
await $`git push origin HEAD --tags --no-verify --force-with-lease`
await new Promise((resolve) => setTimeout(resolve, 5_000))
await $`gh release edit v${Script.version} --draft --title "v${Script.version}" --notes ${notes.join("\n") || "No notable changes"}`
}
console.log("\n=== cli ===\n")
await import(`../packages/opencode/script/publish.ts`)