diff options
| author | Dax Raad <[email protected]> | 2025-11-03 16:56:41 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-03 16:56:41 -0500 |
| commit | 5708e3bf1ec27cccf8b11ffce9325a88bb772566 (patch) | |
| tree | 6a6a11b54b14f3dc7e430d0f60124d569c3d21b5 /script/publish.ts | |
| parent | 0da1ed3fc8037f3bdf5b9e1ceb4a698f650b4151 (diff) | |
| download | opencode-5708e3bf1ec27cccf8b11ffce9325a88bb772566.tar.gz opencode-5708e3bf1ec27cccf8b11ffce9325a88bb772566.zip | |
ci: tweak
Diffstat (limited to 'script/publish.ts')
| -rwxr-xr-x | script/publish.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/script/publish.ts b/script/publish.ts index 307755a1c..7bf82da36 100755 --- a/script/publish.ts +++ b/script/publish.ts @@ -1,7 +1,7 @@ #!/usr/bin/env bun import { $ } from "bun" -import { createOpencode } from "@opencode-ai/sdk" +import { createOpencodeClient, createOpencodeServer } from "@opencode-ai/sdk" import { Script } from "@opencode-ai/script" const notes = [] as string[] @@ -24,7 +24,15 @@ if (!Script.preview) { .filter((line) => line && !line.match(/^\w+ (ignore:|test:|chore:)/i)) .join("\n") - const opencode = await createOpencode() + createOpencodeServer({ + port: 4096, + }).catch(() => {}) + await new Promise((resolve) => setTimeout(resolve, 1_000)) + const opencode = { + client: createOpencodeClient({ + baseUrl: `http://127.0.0.1:4096`, + }), + } const session = await opencode.client.session.create() console.log("generating changelog since " + previous) const raw = await opencode.client.session @@ -68,7 +76,6 @@ if (!Script.preview) { } } console.log(notes) - opencode.server.close() } const pkgjsons = await Array.fromAsync( |
