This commit is contained in:
Dax Raad
2025-05-31 18:10:49 -04:00
parent b4f809559e
commit 6d21525e71
4 changed files with 68 additions and 33 deletions

View File

@@ -31,7 +31,7 @@ for (const [os, arch] of targets) {
await $`GOOS=${os} GOARCH=${GOARCH[arch]} go build -ldflags="-s -w -X github.com/sst/opencode/internal/version.Version=${version}" -o ../opencode/dist/${name}/bin/tui ../tui/main.go`.cwd(
"../tui",
)
await $`bun build --compile --minify --target=bun-${os}-${arch} --outfile=dist/${name}/bin/opencode ./src/index.ts ./dist/${name}/bin/tui`
await $`bun build --define OPENCODE_VERSION="'${version}'" --compile --minify --target=bun-${os}-${arch} --outfile=dist/${name}/bin/opencode ./src/index.ts ./dist/${name}/bin/tui`
await $`rm -rf ./dist/${name}/bin/tui`
await Bun.file(`dist/${name}/package.json`).write(
JSON.stringify(
@@ -56,7 +56,7 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
{
name: pkg.name + "-ai",
bin: {
[pkg.name]: `./bin/${pkg.name}.mjs`,
[pkg.name]: `./bin/${pkg.name}`,
},
version,
optionalDependencies,