2021-04-04 05:01:32 -05:00
|
|
|
use vergen::vergen;
|
|
|
|
|
2017-08-03 13:36:58 -05:00
|
|
|
fn main() {
|
2020-04-23 12:20:09 -05:00
|
|
|
// Don't rebuild miri when nothing changed.
|
2017-08-09 11:05:34 -05:00
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
2018-09-16 08:06:05 -05:00
|
|
|
// vergen
|
2021-04-04 05:01:32 -05:00
|
|
|
let mut gen_config = vergen::Config::default();
|
|
|
|
*gen_config.git_mut().sha_kind_mut() = vergen::ShaKind::Short;
|
|
|
|
*gen_config.git_mut().commit_timestamp_kind_mut() = vergen::TimestampKind::DateOnly;
|
2021-05-15 07:17:30 -05:00
|
|
|
vergen(gen_config).ok(); // Ignore failure (in case we are built outside a git repo)
|
2017-08-03 13:36:58 -05:00
|
|
|
}
|