Skipping compilation of front-end for musl build

This commit is contained in:
Dave
2026-03-13 13:04:29 +00:00
parent 1a232f36af
commit bdffb44bb7

View File

@@ -29,6 +29,19 @@ fn main() {
return; return;
} }
// When cross-compiling (e.g. musl via `cross`), the Docker container
// has no Node/pnpm. The release script builds macOS first, so
// frontend/dist/ already exists. Skip the frontend build in that case.
let target = env::var("TARGET").unwrap_or_default();
let host = env::var("HOST").unwrap_or_default();
if target != host {
let dist = Path::new("../frontend/dist");
if !dist.exists() {
panic!("Cross-compiling but frontend/dist/ is missing. Build macOS first.");
}
return;
}
let frontend_dir = Path::new("../frontend"); let frontend_dir = Path::new("../frontend");
// Ensure dependencies are installed and build the frontend bundle. // Ensure dependencies are installed and build the frontend bundle.