sync
This commit is contained in:
parent
31a3c0082c
commit
65a18700fa
3 changed files with 13 additions and 0 deletions
1
bun.lock
1
bun.lock
|
|
@ -177,6 +177,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ai-sdk/amazon-bedrock": "2.2.10",
|
"@ai-sdk/amazon-bedrock": "2.2.10",
|
||||||
"@octokit/webhooks-types": "7.6.1",
|
"@octokit/webhooks-types": "7.6.1",
|
||||||
|
"@opentui/core-win32-x64": "0.1.24",
|
||||||
"@standard-schema/spec": "1.0.0",
|
"@standard-schema/spec": "1.0.0",
|
||||||
"@tsconfig/bun": "1.0.7",
|
"@tsconfig/bun": "1.0.7",
|
||||||
"@types/bun": "catalog:",
|
"@types/bun": "catalog:",
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ai-sdk/amazon-bedrock": "2.2.10",
|
"@ai-sdk/amazon-bedrock": "2.2.10",
|
||||||
"@octokit/webhooks-types": "7.6.1",
|
"@octokit/webhooks-types": "7.6.1",
|
||||||
|
"@opentui/core-win32-x64": "0.1.24",
|
||||||
"@standard-schema/spec": "1.0.0",
|
"@standard-schema/spec": "1.0.0",
|
||||||
"@tsconfig/bun": "1.0.7",
|
"@tsconfig/bun": "1.0.7",
|
||||||
"@types/bun": "catalog:",
|
"@types/bun": "catalog:",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
#!/usr/bin/env bun
|
#!/usr/bin/env bun
|
||||||
|
|
||||||
|
import solidPlugin from "../../../node_modules/@opentui/solid/scripts/solid-plugin"
|
||||||
|
|
||||||
const dir = new URL("..", import.meta.url).pathname
|
const dir = new URL("..", import.meta.url).pathname
|
||||||
process.chdir(dir)
|
process.chdir(dir)
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
|
import path from "path"
|
||||||
|
|
||||||
import pkg from "../package.json"
|
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(
|
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",
|
"../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({
|
await Bun.build({
|
||||||
|
conditions: ["browser"],
|
||||||
|
tsconfig: "./tsconfig.json",
|
||||||
|
plugins: [solidPlugin],
|
||||||
compile: {
|
compile: {
|
||||||
target: `bun-${os}-${arch}` as any,
|
target: `bun-${os}-${arch}` as any,
|
||||||
outfile: `dist/${name}/bin/opencode`,
|
outfile: `dist/${name}/bin/opencode`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue