ndl 0.2.15

A minimal TUI client for Threads
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::process::Command;

fn main() {
    // Get git describe output (tag, commits since tag, hash, dirty status)
    let git_describe = Command::new("git")
        .args(["describe", "--tags", "--always", "--dirty"])
        .output()
        .ok()
        .filter(|o| o.status.success())
        .and_then(|o| String::from_utf8(o.stdout).ok())
        .map(|s| s.trim().to_string())
        .unwrap_or_else(|| "unknown".to_string());

    println!("cargo::rerun-if-changed=.git/HEAD");
    println!("cargo::rerun-if-changed=.git/refs/tags");
    println!("cargo::rustc-env=NDL_GIT_VERSION={}", git_describe);
}