farmcontrol-server/scripts/clean-build.mjs
Tom Butcher c14a12648a
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
Refactor Jenkinsfile and update build scripts
- Introduced a new runBuild function in Jenkinsfile to streamline build command execution across different environments.
- Updated package.json to use a new cleanBuild script for improved build cleanup.
- Enhanced build-macos.mjs to support architecture-specific builds with better cross-compilation handling.
- Added a new clean-build.mjs script for efficient removal of build artifacts.
2026-08-01 21:08:23 +01:00

10 lines
300 B
JavaScript

import { rmSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
for (const dir of ["build", "dist"]) {
rmSync(path.join(rootDir, dir), { recursive: true, force: true });
}