From d9ea54beccc03195b86dce8d4f6748399aec939b Mon Sep 17 00:00:00 2001 From: Adrian Filip Date: Thu, 15 Feb 2024 22:34:00 +0200 Subject: [PATCH] version command returns build time VERSION env or Cargo.toml version needed for artifact version update version command returns build time VERSION env or Cargo.toml version --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 13020e6..8f6f106 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