added git version to compile time variables

This commit is contained in:
Paul 2022-12-29 13:56:36 +01:00
parent aafb4ed64e
commit 4922cd228f

View File

@ -68,9 +68,10 @@ impl Context {
},
client: Client::builder()
.user_agent(format!(
"{}/{}@{}",
"{}/{}@{}/{}",
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_VERSION"),
GIT_VERSION,
gethostname(false)
))
.build()
@ -98,7 +99,7 @@ impl Context {
pub fn argparse() -> ArgMatches {
Command::new(env!("CARGO_PKG_NAME"))
.version(env!("CARGO_PKG_VERSION"))
.version(format!("{}/{}", env!("CARGO_PKG_VERSION"), GIT_VERSION).as_str())
.author(env!("CARGO_PKG_AUTHORS"))
.about(env!("CARGO_PKG_DESCRIPTION"))
.arg(