Av1an/av1an-cli/build.rs
2021-10-31 22:20:38 +02:00

12 lines
367 B
Rust

use vergen::{vergen, Config, ShaKind, TimestampKind};
fn main() {
let mut config = Config::default();
*config.git_mut().sha_kind_mut() = ShaKind::Short;
*config.git_mut().commit_timestamp_kind_mut() = TimestampKind::All;
*config.build_mut().kind_mut() = TimestampKind::All;
// ignore error if we can't get the git commit hash
let _ = vergen(config);
}