summary refs log tree commit diff
path: root/build.rs
blob: d9814cbbf829b0fbff47cf5cfac5118e99f9af05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::process::Command;

fn main() {
    println!("cargo::rerun-if-changed=Cargo.toml");
    let status = Command::new("bash")
        .args(["-c", r#"
            set -o pipefail
            stylance . | sed "s/^\.\/\.\//cargo::rerun-if-changed=/"
        "#])
        .status()
        .expect("Could not run stylance");

    if !status.success() {
        panic!("Stylance did not run successfully");
    }
}