File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 run : bun run typecheck
3232
3333 - name : Build bridge binaries
34+ if : runner.os != 'Windows'
3435 run : bun run build
3536
37+ - name : Build Windows bridge binary
38+ if : runner.os == 'Windows'
39+ run : bun run build:bridge
40+ env :
41+ BUILD_TARGETS : bun-windows-x64
42+
3643 - name : Run tests
3744 run : bun test
Original file line number Diff line number Diff line change 11#!/usr/bin/env bun
22import { $ } from "bun" ;
33
4- const targets = [
4+ const allTargets = [
55 "bun-linux-x64" ,
66 "bun-linux-arm64" ,
77 "bun-darwin-x64" ,
88 "bun-darwin-arm64" ,
99 "bun-windows-x64" ,
1010] ;
1111
12+ const requestedTargets = process . env . BUILD_TARGETS ?. split ( "," )
13+ . map ( ( target ) => target . trim ( ) )
14+ . filter ( Boolean ) ;
15+
16+ const targets = requestedTargets ?. length ? requestedTargets : allTargets ;
17+
18+ for ( const target of targets ) {
19+ if ( ! allTargets . includes ( target ) ) {
20+ throw new Error ( `Unknown bridge build target: ${ target } ` ) ;
21+ }
22+ }
23+
1224const outDir = "./public/bin" ;
1325
1426await $ `mkdir -p ${ outDir } ` ;
You can’t perform that action at this time.
0 commit comments