Fix docs.rs build for nym-vesting-contract and nym-bin-common

This commit is contained in:
Jon Häggblad
2023-03-08 09:14:07 +01:00
parent 597a53d11a
commit 4fe1b4c26f
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -4,5 +4,10 @@
use vergen::{vergen, Config};
fn main() {
vergen(Config::default()).expect("failed to extract build metadata")
let mut config = Config::default();
if std::env::var("DOCS_RS").is_ok() {
// If we don't have access to git information, such as in a docs.rs build, don't error
*config.git_mut().skip_if_error_mut() = true;
}
vergen(config).expect("failed to extract build metadata");
}
+1 -1
View File
@@ -9,5 +9,5 @@ fn main() {
// If we don't have access to git information, such as in a docs.rs build, don't error
*config.git_mut().skip_if_error_mut() = true;
}
vergen(Config::default()).expect("failed to extract build metadata")
vergen(config).expect("failed to extract build metadata")
}