From 4922cd228fb5103c4a89b3996cc5e730c2e9271c Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Thu, 29 Dec 2022 13:56:36 +0100 Subject: [PATCH] added git version to compile time variables --- src/config/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index ea9a97a..3dc0275 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -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(