mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
15 lines
441 B
TypeScript
Executable file
15 lines
441 B
TypeScript
Executable file
#!/usr/bin/env bun
|
|
import { $ } from "bun"
|
|
|
|
import { copyBinaryToSidecarFolder, getCurrentSidecar } from "./utils"
|
|
|
|
const sidecarConfig = getCurrentSidecar()
|
|
|
|
const dir = "src-tauri/target/opencode-binaries"
|
|
|
|
await $`mkdir -p ${dir}`
|
|
await $`gh run download ${Bun.env.GITHUB_RUN_ID} -n opencode-cli`.cwd(dir)
|
|
|
|
await copyBinaryToSidecarFolder(
|
|
`${dir}/${sidecarConfig.ocBinary}/bin/opencode${process.platform === "win32" ? ".exe" : ""}`,
|
|
)
|