farmcontrol-server/scripts/write-build-info.mjs
Tom Butcher 8741a2c6fd
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
Enhance build configuration and scripts
- 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.
2026-08-01 21:13:51 +01:00

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})`);