This commit is contained in:
Dax Raad
2025-09-21 02:36:50 -04:00
parent 31a3c0082c
commit 65a18700fa
3 changed files with 13 additions and 0 deletions

View File

@@ -177,6 +177,7 @@
"devDependencies": {
"@ai-sdk/amazon-bedrock": "2.2.10",
"@octokit/webhooks-types": "7.6.1",
"@opentui/core-win32-x64": "0.1.24",
"@standard-schema/spec": "1.0.0",
"@tsconfig/bun": "1.0.7",
"@types/bun": "catalog:",

View File

@@ -18,6 +18,7 @@
"devDependencies": {
"@ai-sdk/amazon-bedrock": "2.2.10",
"@octokit/webhooks-types": "7.6.1",
"@opentui/core-win32-x64": "0.1.24",
"@standard-schema/spec": "1.0.0",
"@tsconfig/bun": "1.0.7",
"@types/bun": "catalog:",

View File

@@ -1,7 +1,11 @@
#!/usr/bin/env bun
import solidPlugin from "../../../node_modules/@opentui/solid/scripts/solid-plugin"
const dir = new URL("..", import.meta.url).pathname
process.chdir(dir)
import { $ } from "bun"
import path from "path"
import pkg from "../package.json"
@@ -32,7 +36,14 @@ 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",
)
const opentui = `@opentui/core-${os === "windows" ? "win32" : os}-${arch.replace("-baseline", "")}`
await $`mkdir -p ../../node_modules/${opentui}`
await $`npm pack npm pack ${opentui}`.cwd(path.join(dir, "../../node_modules"))
await $`tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1`
await Bun.build({
conditions: ["browser"],
tsconfig: "./tsconfig.json",
plugins: [solidPlugin],
compile: {
target: `bun-${os}-${arch}` as any,
outfile: `dist/${name}/bin/opencode`,