fix long version on nix and ci

This commit is contained in:
Clément DOUIN
2024-11-20 15:00:17 +01:00
parent 396a91a322
commit 36f3690cba
4 changed files with 32 additions and 32 deletions
+18 -1
View File
@@ -24,7 +24,9 @@ use crate::{
};
#[derive(Parser, Debug)]
#[command(name = "himalaya", author, version, about)]
#[command(name = env!("CARGO_PKG_NAME"))]
#[command(author, version, about)]
#[command(long_version = Cli::LONG_VERSION)]
#[command(propagate_version = true, infer_subcommands = true)]
pub struct Cli {
#[command(subcommand)]
@@ -72,6 +74,21 @@ pub struct Cli {
pub trace: bool,
}
impl Cli {
pub const LONG_VERSION: &'static str = concat!(
"v",
env!("CARGO_PKG_VERSION"),
" on ",
env!("TARGET_OS"),
" ",
env!("TARGET_ENV"),
" ",
env!("TARGET_ARCH"),
", git rev ",
env!("GIT_REV"),
);
}
#[derive(Subcommand, Debug)]
pub enum HimalayaCommand {
#[command(subcommand)]