diff options
| author | Dax Raad <[email protected]> | 2025-09-10 03:36:42 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-09-10 03:36:42 -0400 |
| commit | a6265ea3d2c1d991f102ac865393a5e594986d86 (patch) | |
| tree | 98be14136f1f04b82ccd4dc602b27fa6b21d2257 /packages | |
| parent | bb3f02b8bb49bce844c8668b438541fe2175e544 (diff) | |
| download | opencode-a6265ea3d2c1d991f102ac865393a5e594986d86.tar.gz opencode-a6265ea3d2c1d991f102ac865393a5e594986d86.zip | |
upgrade to latest bun
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/package.json | 2 | ||||
| -rwxr-xr-x | packages/opencode/script/publish.ts | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 4d86c23bf..93045cda1 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -19,7 +19,7 @@ "@octokit/webhooks-types": "7.6.1", "@standard-schema/spec": "1.0.0", "@tsconfig/bun": "1.0.7", - "@types/bun": "latest", + "@types/bun": "catalog:", "@types/turndown": "5.0.5", "@types/yargs": "17.0.33", "typescript": "catalog:", diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts index 0de48fe67..44af7ad9f 100755 --- a/packages/opencode/script/publish.ts +++ b/packages/opencode/script/publish.ts @@ -38,7 +38,20 @@ for (const [os, arch] of targets) { await $`CGO_ENABLED=0 GOOS=${os} GOARCH=${GOARCH[arch]} go build -ldflags="-s -w -X main.Version=${version}" -o ../opencode/dist/${name}/bin/tui ../tui/cmd/opencode/main.go`.cwd( "../tui", ) - await $`bun build --define OPENCODE_TUI_PATH="'../../../dist/${name}/bin/tui'" --define OPENCODE_VERSION="'${version}'" --compile --target=bun-${os}-${arch} --outfile=dist/${name}/bin/opencode ./src/index.ts` + await Bun.build({ + compile: { + target: `bun-${os}-${arch}` as any, + outfile: `dist/${name}/bin/opencode`, + execArgv: [`--user-agent=opencode/${version}`], + windows: {}, + }, + entrypoints: ["./src/index.ts"], + define: { + OPENCODE_VERSION: `'${version}'`, + OPENCODE_TUI_PATH: `'../../../dist/${name}/bin/tui'`, + }, + }) + // await $`bun build --define OPENCODE_TUI_PATH="'../../../dist/${name}/bin/tui'" --define OPENCODE_VERSION="'${version}'" --compile --target=bun-${os}-${arch} --outfile=dist/${name}/bin/opencode ./src/index.ts` // Run the binary only if it matches current OS/arch if ( process.platform === (os === "windows" ? "win32" : os) && |
