mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Show Git SHA information when printing version information (#120)
This commit is contained in:
parent
a020b860dd
commit
2a573b6056
5 changed files with 38 additions and 2 deletions
|
@ -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)]
|
||||
|
|
|
@ -538,7 +538,7 @@ impl Window<IambInfo> for IambWindow {
|
|||
title.into(),
|
||||
];
|
||||
Spans(v)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue