Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
- Updated electrobun.config.ts to include environment-based settings for macOS builds. - Added new build scripts for Windows and macOS, including support for architecture-specific builds. - Introduced scripts for cleaning build artifacts, managing dependencies, and ensuring core binaries are present. - Enhanced Jenkinsfile to integrate new build processes and improve artifact management. - Added new assets for application icons and installer configurations. - Implemented NSIS and MSI packaging scripts for Windows installer creation. - Updated package.json with new scripts for development and build processes, including post-installation tasks.
37 lines
790 B
JavaScript
37 lines
790 B
JavaScript
import { spawnSync } from "node:child_process";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
|
const result = spawnSync("bun", ["x", "vite", "build"], {
|
|
cwd: rootDir,
|
|
stdio: "inherit",
|
|
env: {
|
|
...process.env,
|
|
NODE_ENV: process.env.NODE_ENV || "production",
|
|
},
|
|
});
|
|
|
|
if (result.status !== 0) {
|
|
process.exit(result.status ?? 1);
|
|
}
|
|
|
|
const syncResult = spawnSync(
|
|
"bun",
|
|
[path.join(rootDir, "scripts/sync-electrobun-views.mjs")],
|
|
{
|
|
cwd: rootDir,
|
|
stdio: "inherit",
|
|
env: process.env,
|
|
},
|
|
);
|
|
|
|
if (syncResult.status !== 0) {
|
|
process.exit(syncResult.status ?? 1);
|
|
}
|
|
|
|
console.log(
|
|
`build-renderer: output at ${path.join(rootDir, "dist/mainview")}`,
|
|
);
|