Use short SHA in start message

feature/v32-tokens
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,8 +244,8 @@ 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"),
"\n\n",