veloxc 0.1.2

CLI tools for building Velox applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
fn main() {
    let rev = std::process::Command::new("git")
        .args(["rev-parse", "--short", "HEAD"])
        .output()
        .ok()
        .and_then(|o| String::from_utf8(o.stdout).ok())
        .map(|s| s.trim().to_string())
        .filter(|s| !s.is_empty())
        .unwrap_or_else(|| "unknown".to_string());
    println!("cargo:rustc-env=VELOX_GIT_REV={}", rev);
    println!("cargo:rerun-if-changed=../../.git/HEAD");
}