From c435f76d084d4d5d24d98ea9a07415e9869f7f31 Mon Sep 17 00:00:00 2001 From: Nadja Reitzenstein Date: Sat, 14 May 2022 15:36:32 +0200 Subject: [PATCH] --version talks about API version too --- bffhd/capnp/connection.rs | 2 +- bffhd/lib.rs | 2 +- bin/bffhd/main.rs | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bffhd/capnp/connection.rs b/bffhd/capnp/connection.rs index d950e50..f8517e9 100644 --- a/bffhd/capnp/connection.rs +++ b/bffhd/capnp/connection.rs @@ -51,7 +51,7 @@ impl bootstrap::Server for BootCap { let _guard = span.enter(); let mut builder = result.get(); builder.set_name("bffhd"); - builder.set_release(crate::RELEASE_STRING); + builder.set_release(crate::env::VERSION); Promise::ok(()) } diff --git a/bffhd/lib.rs b/bffhd/lib.rs index 45a8466..c7d457d 100644 --- a/bffhd/lib.rs +++ b/bffhd/lib.rs @@ -76,7 +76,7 @@ pub static RESOURCES: OnceCell = OnceCell::new(); impl Diflouroborane { pub fn new(config: Config) -> anyhow::Result { logging::init(&config.logging); - tracing::info!(version = VERSION_STRING, "Starting BFFH"); + tracing::info!(version = env::VERSION, "Starting BFFH"); let span = tracing::info_span!("setup"); let _guard = span.enter(); diff --git a/bin/bffhd/main.rs b/bin/bffhd/main.rs index a6a2f87..846e160 100644 --- a/bin/bffhd/main.rs +++ b/bin/bffhd/main.rs @@ -11,7 +11,11 @@ fn main() -> anyhow::Result<()> { // values for the name, description and version are pulled from `Cargo.toml`. let matches = Command::new(clap::crate_name!()) .version(clap::crate_version!()) - .long_version(diflouroborane::VERSION_STRING) + .long_version(&*format!("Diflouroborane {version} + \t Implementing API {apiver}", + version=diflouroborane::env::VERSION, + apiver="0.3") + ) .about(clap::crate_description!()) .arg( Arg::new("config")