fabro/lib/crates/fabro-server/build.rs
Bryan Helmkamp 75b0e0879a
Stabilize workspace tests and clean warnings
Make the full workspace nextest run reliable after the run-store migration,
restore legacy test-harness projections needed by workflow integration tests,
and clear the remaining fmt/clippy issues in the touched paths.
2026-04-02 06:33:22 -07:00

29 lines
981 B
Rust

use std::path::PathBuf;
use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=../../../apps/fabro-web/app");
println!("cargo:rerun-if-changed=../../../apps/fabro-web/public");
println!("cargo:rerun-if-changed=../../../apps/fabro-web/scripts/build.ts");
println!("cargo:rerun-if-changed=../../../apps/fabro-web/index.template.html");
println!("cargo:rerun-if-changed=../../../apps/fabro-web/package.json");
let profile = std::env::var("PROFILE").unwrap_or_default();
if profile != "release" {
return;
}
let web_dir =
PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("../../../apps/fabro-web");
let status = Command::new("bun")
.args(["run", "build"])
.current_dir(&web_dir)
.status()
.expect("failed to run `bun run build` for embedded web assets");
assert!(
status.success(),
"`bun run build` failed for embedded web assets"
);
}