Skip to content

Commit 5a1412c

Browse files
committed
sync
1 parent f730ad5 commit 5a1412c

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

script/publish.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ import { $ } from "bun"
44
import { Script } from "@opencode-ai/script"
55
import { buildNotes, getLatestRelease } from "./changelog"
66

7-
if (!Script.release) {
8-
throw new Error("Missing OPENCODE_RELEASE environment variable")
9-
}
10-
117
const highlightsTemplate = `
128
<!--
139
Add highlights before publishing. Delete this section if no highlights.
@@ -69,13 +65,15 @@ await Bun.file(extensionToml).write(toml)
6965
await $`bun install`
7066
await 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

8078
console.log("\n=== cli ===\n")
8179
await import(`../packages/opencode/script/publish.ts`)

0 commit comments

Comments
 (0)