Files
certifai/build.rs
Sharang Parnerkar e9251f403e
Some checks failed
CI / Security Audit (pull_request) Successful in 1m38s
CI / Tests (pull_request) Has been skipped
CI / Build & Push Image (pull_request) Has been skipped
CI / Format (push) Failing after 3s
CI / Security Audit (push) Has been cancelled
CI / Tests (push) Has been cancelled
CI / Build & Push Image (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Format (pull_request) Failing after 3s
CI / Clippy (pull_request) Failing after 1m20s
fix(ci): graceful tailwind skip and add dx fmt check
build.rs no longer panics when bunx is unavailable, allowing
cargo clippy/test to run in CI without bun installed. Added
dx fmt --check to the format job for RSX formatting validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:08:04 +01:00

27 lines
771 B
Rust

fn main() -> Result<(), Box<dyn std::error::Error>> {
use std::process::Command;
println!("cargo:rerun-if-changed=./styles/input.css");
// Tailwind build is optional - skip gracefully in CI or environments without bun
match Command::new("bunx")
.args([
"@tailwindcss/cli",
"-i",
"./styles/input.css",
"-o",
"./assets/tailwind.css",
])
.status()
{
Ok(status) if !status.success() => {
println!("cargo:warning=tailwind build exited with {status}, skipping CSS generation");
}
Err(e) => {
println!("cargo:warning=bunx not found ({e}), skipping tailwind CSS generation");
}
Ok(_) => {}
}
Ok(())
}