pacdef_core 1.6.0

pacdef core library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::process::Command;

fn main() {
    let git_hash = match Command::new("git")
        .args(["rev-parse", "--short", "HEAD"])
        .output()
    {
        Ok(output) => String::from_utf8(output.stdout).expect("git output is utf-8"),
        _ => String::new(),
    };

    println!("cargo:rustc-env=GIT_HASH={git_hash}");
}