Macro version

Source
macro_rules! version {
    ($($proc_macro:tt)*) => { ... };
}
Expand description

Determine properties of the git working tree at the crate root, if any

ยงExample

use version_consts_git::version;
fn main() {
    match version!() {
        None => eprintln!("not built from git"),
        Some(x) => {
            print!("{}", x.commit);
            if x.dirty {
                println!(" (dirty)");
            } else {
                println!();
            }
        }
    }
}