feat(cli): publish Node builds as opencode2-node

This commit is contained in:
Simon Klee
2026-07-16 08:43:29 +02:00
parent 19951c08f3
commit 098aaa1b84
13 changed files with 258 additions and 95 deletions
+3 -3
View File
@@ -57,7 +57,7 @@ const builder =
: undefined
for (const target of targets) {
console.log(`building cli-${targetName(target)}`)
console.log(`building cli-node-${targetName(target)}`)
const assets = await collectNodeAssets(target)
await rm("dist-node", { recursive: true, force: true })
const assetHash = await hashNodeAssets(assets)
@@ -73,8 +73,8 @@ for (const target of targets) {
}
if (bundleOnly) continue
const name = `cli-${targetName(target)}`
const binary = target.platform === "win32" ? "opencode2.exe" : "opencode2"
const name = `cli-node-${targetName(target)}`
const binary = target.platform === "win32" ? "opencode2-node.exe" : "opencode2-node"
const output = path.join(outdir, name, "bin", binary)
if (!builder) throw new Error("Node SEA builder is unavailable")
await mkdir(path.dirname(output), { recursive: true })