2021-04-04 12:01:32 +02:00
|
|
|
use vergen::vergen;
|
|
|
|
|
2017-08-03 11:36:58 -07:00
|
|
|
fn main() {
|
2020-04-23 19:20:09 +02:00
|
|
|
// Don't rebuild miri when nothing changed.
|
2017-08-09 18:05:34 +02:00
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
2018-09-16 15:06:05 +02:00
|
|
|
// vergen
|
2021-04-04 12:01:32 +02: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 14:17:30 +02:00
|
|
|
vergen(gen_config).ok(); // Ignore failure (in case we are built outside a git repo)
|
2017-08-03 11:36:58 -07:00
|
|
|
}
|