[][src]Macro version_consts_git::version

macro_rules! version {
    #[proc_macro_hack] => { ... };
}

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!();
            }
        }
    }
}