predev.ts 390 B

12345678910111213
  1. import { $ } from "bun"
  2. import { copyBinaryToSidecarFolder, getCurrentSidecar } from "./utils"
  3. const RUST_TARGET = Bun.env.TAURI_ENV_TARGET_TRIPLE
  4. const sidecarConfig = getCurrentSidecar(RUST_TARGET)
  5. const binaryPath = `../opencode/dist/${sidecarConfig.ocBinary}/bin/opencode`
  6. await $`cd ../opencode && bun run build --single`
  7. await copyBinaryToSidecarFolder(binaryPath, RUST_TARGET)