Skip to main content

git_version

Macro git_version 

Source
git_version!() { /* proc-macro */ }
Expand description

Get the git version for the source code.

§Examples

const VERSION: &str = git_version!();
// Return "unknown" instead of hard-failing the build when `git describe`
// can't run (e.g. no git binary, or building outside a git checkout).
const VERSION: &str = git_version!(fallback = "unknown");