f9447f8e5f
Windows / build (push) Waiting to run
CI / typecheck · build · test · bundle-size (push) Failing after 1s
CI / clean-room dependency closure smoke (push) Failing after 1s
CI / server-runtime e2e (docker · pg + valkey) (push) Failing after 2s
Deploy Install Scripts / deploy (push) Failing after 2s
23 lines
676 B
JavaScript
Executable File
23 lines
676 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
import { execSync } from 'child_process';
|
|
import fs from 'fs';
|
|
|
|
const version = JSON.parse(fs.readFileSync('package.json', 'utf-8')).version;
|
|
const outDir = 'dist/binaries';
|
|
|
|
fs.mkdirSync(outDir, { recursive: true });
|
|
|
|
console.log(`Building Windows exe v${version}...`);
|
|
|
|
try {
|
|
execSync(
|
|
`bun build --compile --minify --target=bun-windows-x64 ./src/services/worker-service.ts --outfile ${outDir}/worker-service-v${version}-win-x64.exe`,
|
|
{ stdio: 'inherit' }
|
|
);
|
|
console.log(`\nBuilt: ${outDir}/worker-service-v${version}-win-x64.exe`);
|
|
} catch (error) {
|
|
console.error('Failed to build Windows binary:', error.message);
|
|
process.exit(1);
|
|
}
|