Use short SHA in start message

This commit is contained in:
Edward Shen 2021-06-06 18:17:42 -04:00
parent 75752eb13e
commit 97ea5eb448
Signed by: edward
GPG key ID: 19182661E818369F
2 changed files with 6 additions and 4 deletions

View file

@ -1,8 +1,10 @@
use std::error::Error;
use vergen::{vergen, Config};
use vergen::{vergen, Config, ShaKind};
fn main() -> Result<(), Box<dyn Error>> {
vergen(Config::default())?;
let mut config = Config::default();
*config.git_mut().sha_kind_mut() = ShaKind::Short;
vergen(config)?;
Ok(())
}

View file

@ -244,7 +244,7 @@ fn print_preamble_and_warnings(args: &CliArgs) -> Result<(), Box<dyn Error>> {
" ",
env!("CARGO_PKG_VERSION"),
" (",
env!("VERGEN_GIT_SHA"),
env!("VERGEN_GIT_SHA_SHORT"),
")",
" Copyright (C) 2021 ",
env!("CARGO_PKG_AUTHORS"),