|
@@ -2,7 +2,6 @@
|
|
|
|
|
|
|
|
import { $ } from "bun"
|
|
import { $ } from "bun"
|
|
|
import { Script } from "@opencode-ai/script"
|
|
import { Script } from "@opencode-ai/script"
|
|
|
-import { buildNotes, getLatestRelease } from "./changelog"
|
|
|
|
|
|
|
|
|
|
const highlightsTemplate = `
|
|
const highlightsTemplate = `
|
|
|
<!--
|
|
<!--
|
|
@@ -58,17 +57,12 @@ await $`bun install`
|
|
|
await import(`../packages/sdk/js/script/build.ts`)
|
|
await import(`../packages/sdk/js/script/build.ts`)
|
|
|
|
|
|
|
|
if (Script.release) {
|
|
if (Script.release) {
|
|
|
- // notes.unshift(highlightsTemplate)
|
|
|
|
|
await $`git commit -am "release: v${Script.version}"`
|
|
await $`git commit -am "release: v${Script.version}"`
|
|
|
await $`git tag v${Script.version}`
|
|
await $`git tag v${Script.version}`
|
|
|
await $`git fetch origin`
|
|
await $`git fetch origin`
|
|
|
await $`git cherry-pick HEAD..origin/dev`.nothrow()
|
|
await $`git cherry-pick HEAD..origin/dev`.nothrow()
|
|
|
await $`git push origin HEAD --tags --no-verify --force-with-lease`
|
|
await $`git push origin HEAD --tags --no-verify --force-with-lease`
|
|
|
await new Promise((resolve) => setTimeout(resolve, 5_000))
|
|
await new Promise((resolve) => setTimeout(resolve, 5_000))
|
|
|
- const previous = await getLatestRelease()
|
|
|
|
|
- console.log("previous", previous)
|
|
|
|
|
- const notes = await buildNotes(previous, "dev")
|
|
|
|
|
- await $`gh release edit v${Script.version} --draft=false --title "v${Script.version}" --notes ${notes.join("\n") || "No notable changes"}`
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
console.log("\n=== cli ===\n")
|
|
console.log("\n=== cli ===\n")
|