Skipping compilation of front-end for musl build
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user