@@ -4,10 +4,6 @@ import { $ } from "bun"
44import { Script } from "@opencode-ai/script"
55import { buildNotes , getLatestRelease } from "./changelog"
66
7- if ( ! Script . release ) {
8- throw new Error ( "Missing OPENCODE_RELEASE environment variable" )
9- }
10-
117const highlightsTemplate = `
128<!--
139Add highlights before publishing. Delete this section if no highlights.
@@ -69,13 +65,15 @@ await Bun.file(extensionToml).write(toml)
6965await $ `bun install`
7066await import ( `../packages/sdk/js/script/build.ts` )
7167
72- await $ `git commit -am "release: v${ Script . version } "`
73- await $ `git tag v${ Script . version } `
74- await $ `git fetch origin`
75- await $ `git cherry-pick HEAD..origin/dev` . nothrow ( )
76- await $ `git push origin HEAD --tags --no-verify --force-with-lease`
77- await new Promise ( ( resolve ) => setTimeout ( resolve , 5_000 ) )
78- await $ `gh release edit v${ Script . version } --draft --title "v${ Script . version } " --notes ${ notes . join ( "\n" ) || "No notable changes" } `
68+ if ( Script . release ) {
69+ await $ `git commit -am "release: v${ Script . version } "`
70+ await $ `git tag v${ Script . version } `
71+ await $ `git fetch origin`
72+ await $ `git cherry-pick HEAD..origin/dev` . nothrow ( )
73+ await $ `git push origin HEAD --tags --no-verify --force-with-lease`
74+ await new Promise ( ( resolve ) => setTimeout ( resolve , 5_000 ) )
75+ await $ `gh release edit v${ Script . version } --draft --title "v${ Script . version } " --notes ${ notes . join ( "\n" ) || "No notable changes" } `
76+ }
7977
8078console . log ( "\n=== cli ===\n" )
8179await import ( `../packages/opencode/script/publish.ts` )
0 commit comments