Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
- Updated electrobun.config.ts to include environment-based settings for stability and external dependencies. - Refactored package.json scripts for improved build processes and streamlined commands. - Added new build scripts for Linux and renderer, while removing the obsolete build-server script. - Enhanced pre-build validation to ensure required files are present and added logging for better visibility. - Updated clean-build script to remove additional artifact directories for thorough cleanup.
16 lines
480 B
JavaScript
16 lines
480 B
JavaScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
const buildNumber =
|
|
process.env.BUILD_NUMBER || process.env.VITE_BUILD_NUMBER || "dev";
|
|
|
|
const buildInfoPath = path.join(rootDir, "src/buildInfo.json");
|
|
|
|
await Bun.write(
|
|
buildInfoPath,
|
|
`${JSON.stringify({ buildNumber }, null, 2)}\n`,
|
|
);
|
|
|
|
console.log(`write-build-info: ${buildInfoPath} (buildNumber=${buildNumber})`);
|