desktop: add electron version (#15663)
This commit is contained in:
parent
e4f0825c56
commit
5cf235fa6c
223 changed files with 4292 additions and 46 deletions
17
packages/desktop-electron/scripts/predev.ts
Normal file
17
packages/desktop-electron/scripts/predev.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { $ } from "bun"
|
||||
|
||||
import { copyBinaryToSidecarFolder, getCurrentSidecar, windowsify } from "./utils"
|
||||
|
||||
await $`bun ./scripts/copy-icons.ts ${process.env.OPENCODE_CHANNEL ?? "dev"}`
|
||||
|
||||
const RUST_TARGET = Bun.env.RUST_TARGET
|
||||
|
||||
const sidecarConfig = getCurrentSidecar(RUST_TARGET)
|
||||
|
||||
const binaryPath = windowsify(`../opencode/dist/${sidecarConfig.ocBinary}/bin/opencode`)
|
||||
|
||||
await (sidecarConfig.ocBinary.includes("-baseline")
|
||||
? $`cd ../opencode && bun run build --single --baseline`
|
||||
: $`cd ../opencode && bun run build --single`)
|
||||
|
||||
await copyBinaryToSidecarFolder(binaryPath, RUST_TARGET)
|
||||
Loading…
Add table
Add a link
Reference in a new issue