Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 5708e3b

Browse files
committed
ci: tweak
1 parent 0da1ed3 commit 5708e3b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

script/publish.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bun
22

33
import { $ } from "bun"
4-
import { createOpencode } from "@opencode-ai/sdk"
4+
import { createOpencodeClient, createOpencodeServer } from "@opencode-ai/sdk"
55
import { Script } from "@opencode-ai/script"
66

77
const notes = [] as string[]
@@ -24,7 +24,15 @@ if (!Script.preview) {
2424
.filter((line) => line && !line.match(/^\w+ (ignore:|test:|chore:)/i))
2525
.join("\n")
2626

27-
const opencode = await createOpencode()
27+
createOpencodeServer({
28+
port: 4096,
29+
}).catch(() => {})
30+
await new Promise((resolve) => setTimeout(resolve, 1_000))
31+
const opencode = {
32+
client: createOpencodeClient({
33+
baseUrl: `http://127.0.0.1:4096`,
34+
}),
35+
}
2836
const session = await opencode.client.session.create()
2937
console.log("generating changelog since " + previous)
3038
const raw = await opencode.client.session
@@ -68,7 +76,6 @@ if (!Script.preview) {
6876
}
6977
}
7078
console.log(notes)
71-
opencode.server.close()
7279
}
7380

7481
const pkgjsons = await Array.fromAsync(

0 commit comments

Comments
 (0)