Some checks reported errors
farmcontrol/farmcontrol-server/pipeline/head Something is wrong with the build of this commit
- Updated electrobun.config.ts to dynamically set the application version from package.json and added a release configuration for base URL. - Modified Jenkinsfile to include the ELECTROBUN_RELEASE_BASE_URL environment variable during the build process. - Refactored build-macos.mjs to streamline the build command execution for different architectures. - Enhanced finalize-desktop-artifacts.mjs to improve artifact handling and introduced a new pre-build script for validation of required files and environment variables. - Improved error handling and logging for better build process visibility.
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import type { ElectrobunConfig } from "electrobun";
|
|
import { readFileSync } from "node:fs";
|
|
|
|
const packageJson = JSON.parse(readFileSync("./package.json", "utf8"));
|
|
|
|
export default {
|
|
app: {
|
|
name: "Farm Control Server",
|
|
identifier: "com.tombutcher.farmcontrolserver",
|
|
version: packageJson.version,
|
|
description: "Farm Control Server desktop host application",
|
|
},
|
|
runtime: {
|
|
exitOnLastWindowClosed: false,
|
|
},
|
|
build: {
|
|
buildFolder: "build",
|
|
artifactFolder: "app_dist",
|
|
bun: {
|
|
entrypoint: "src/bun/index.js",
|
|
},
|
|
copy: {
|
|
"dist/app/index.html": "views/mainview/index.html",
|
|
"dist/app/assets": "views/mainview/assets",
|
|
"config.json": "config.json",
|
|
},
|
|
watch: ["scripts"],
|
|
watchIgnore: ["dist/**", "app_dist/**"],
|
|
mac: {
|
|
bundleCEF: false,
|
|
},
|
|
linux: {
|
|
bundleCEF: false,
|
|
},
|
|
win: {
|
|
bundleCEF: false,
|
|
},
|
|
},
|
|
scripts: {
|
|
preBuild: "scripts/pre-build.mjs",
|
|
postPackage: "scripts/finalize-desktop-artifacts.mjs",
|
|
},
|
|
release: {
|
|
baseUrl:
|
|
process.env.ELECTROBUN_RELEASE_BASE_URL ||
|
|
process.env.RELEASE_BASE_URL ||
|
|
"",
|
|
},
|
|
} satisfies ElectrobunConfig;
|