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