Show Git SHA information when printing version information (#120)

This commit is contained in:
Ulyssa 2023-06-14 20:28:01 -07:00
parent a020b860dd
commit 2a573b6056
No known key found for this signature in database
GPG key ID: 1B3965A3D18B9B64
5 changed files with 38 additions and 2 deletions

View file

@ -89,8 +89,13 @@ fn validate_profile_names(names: &HashMap<String, ProfileConfig>) {
}
}
const VERSION: &str = match option_env!("VERGEN_GIT_SHA") {
None => env!("CARGO_PKG_VERSION"),
Some(_) => concat!(env!("CARGO_PKG_VERSION"), " (", env!("VERGEN_GIT_SHA"), ")"),
};
#[derive(Parser)]
#[clap(version, about, long_about = None)]
#[clap(version = VERSION, about, long_about = None)]
#[clap(propagate_version = true)]
pub struct Iamb {
#[clap(short = 'P', long, value_parser)]

View file

@ -538,7 +538,7 @@ impl Window<IambInfo> for IambWindow {
title.into(),
];
Spans(v)
}
},
}
}