Use version string from git, if present
This commit is contained in:
parent
c43abf09d1
commit
3bd8822f4f
1 changed files with 2 additions and 2 deletions
|
@ -21,12 +21,12 @@
|
||||||
macro_rules! make_imag_version {
|
macro_rules! make_imag_version {
|
||||||
() => {{
|
() => {{
|
||||||
let pkg_version = env!("CARGO_PKG_VERSION");
|
let pkg_version = env!("CARGO_PKG_VERSION");
|
||||||
let git_version = env!("CARGO_BUILD_GIT_HASH");
|
let git_version = env!("CARGO_BUILD_VERSION");
|
||||||
|
|
||||||
if git_version == "" {
|
if git_version == "" {
|
||||||
String::from(pkg_version)
|
String::from(pkg_version)
|
||||||
} else {
|
} else {
|
||||||
format!("{}-{}", pkg_version, git_version)
|
String::from(git_version)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue