plane-common 0.5.5

Client library and common utilities for the Plane session backend orchestrator.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::process::Command;

fn main() {
    let git_hash = Command::new("git")
        .args(["rev-parse", "HEAD"])
        .output()
        .map(|output| {
            let hash = String::from_utf8_lossy(&output.stdout).trim().to_string();
            hash.chars().take(8).collect::<String>()
        })
        .unwrap_or_else(|_| String::from("unknown"));

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