diff options
| author | Dax Raad <[email protected]> | 2025-10-02 01:09:58 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-10-02 01:09:58 -0400 |
| commit | ad307f7f895798d18c6ed6e6f73517c7a6051d61 (patch) | |
| tree | 2e74ba8a1e65f405b0a8b3bb784fa3bf8fc4c1ad /script | |
| parent | eac11c0753dd4792891a8a3bdb3563fd09c006c5 (diff) | |
| download | opencode-ad307f7f895798d18c6ed6e6f73517c7a6051d61.tar.gz opencode-ad307f7f895798d18c6ed6e6f73517c7a6051d61.zip | |
ci: sync
Diffstat (limited to 'script')
| -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 f1268c00b..93bd6633c 100755 --- a/script/publish.ts +++ b/script/publish.ts @@ -70,7 +70,7 @@ if (!snapshot) { const client = createOpencodeClient({ baseUrl: server.url }) const session = await client.session.create() console.log("generating changelog since " + previous) - const notes = await client.session + const raw = await client.session .prompt({ path: { id: session.data!.id, @@ -106,9 +106,16 @@ if (!snapshot) { }, }) .then((x) => x.data?.parts?.find((y) => y.type === "text")?.text) - console.log(notes) + + const notes = [] + for (const line of raw?.split("\n") ?? []) { + if (line.startsWith("- ")) { + notes.push(line) + } + } + server.close() - await $`gh release create v${version} --title "v${version}" --notes ${notes} ./packages/opencode/dist/*.zip` + await $`gh release create v${version} --title "v${version}" --notes ${notes.join("\n") ?? "No notable changes"} ./packages/opencode/dist/*.zip` } if (snapshot) { await $`git checkout -b snapshot-${version}` |
