summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/scripts/predev.ts
blob: 21821519770dcdc88d3c55ed2e67d7f6ba40e001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { $ } from "bun"

import { copyBinaryToSidecarFolder, getCurrentSidecar } from "./utils"

const RUST_TARGET = Bun.env.TAURI_ENV_TARGET_TRIPLE

const sidecarConfig = getCurrentSidecar(RUST_TARGET)

const binaryPath = `../opencode/dist/${sidecarConfig.ocBinary}/bin/opencode`

await $`cd ../opencode && bun run build --single`

await copyBinaryToSidecarFolder(binaryPath, RUST_TARGET)