summaryrefslogtreecommitdiffstats
path: root/build.rs
blob: a22f6352975d188d0e6983a26b520d600ba94bf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::process::Command;

fn main() {
    let build = String::from_utf8_lossy(
        &Command::new("git")
            .args(&["rev-parse", "HEAD"])
            .output()
            .unwrap()
            .stdout,
    )
    .to_string();
    println!(
        "cargo::rustc-env=DWVSH_BUILD={}",
        build.get(0..7).unwrap_or(&build)
    );
}