Function build_data::set_GIT_BRANCH
source · pub fn set_GIT_BRANCH()
Expand description
Sets the GIT_BRANCH
env variable.
Call this from build.rs
.
Use env!
in your main.rs
to use the variable.
Executes the git
command.
Example value: "release"
Panics
Panics if it fails to get the value from git
.