From 034cb8eff4d573061d617cf77562339e41fb06b5 Mon Sep 17 00:00:00 2001 From: Adrian Filip Date: Sun, 18 Feb 2024 04:42:11 +0200 Subject: [PATCH] version command returns build time VERSION env or Cargo.toml version (#66) --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 52bba9d..16c890b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,7 +65,7 @@ enum Command { } #[derive(Parser, Debug)] -#[command(author, version, about, long_about, rename_all = "kebab-case")] +#[command(author, version=option_env!("VERSION").unwrap_or(env!("CARGO_PKG_VERSION")), about, long_about, rename_all = "kebab-case")] /// Command line interface for OSS version of Golem. /// /// For Golem Cloud client see golem-cloud-cli instead: https://github.com/golemcloud/golem-cloud-cli