|
@@ -7,7 +7,13 @@ fn main() -> Result<()> {
|
|
|
*config.git_mut().semver_kind_mut() = SemverKind::Lightweight;
|
|
*config.git_mut().semver_kind_mut() = SemverKind::Lightweight;
|
|
|
// Add a `-dirty` flag to the SEMVER output
|
|
// Add a `-dirty` flag to the SEMVER output
|
|
|
*config.git_mut().semver_dirty_mut() = Some("-dirty");
|
|
*config.git_mut().semver_dirty_mut() = Some("-dirty");
|
|
|
-
|
|
|
|
|
// Generate the instructions
|
|
// Generate the instructions
|
|
|
- vergen(config)
|
|
|
|
|
|
|
+ if let Err(e) = vergen(config) {
|
|
|
|
|
+ eprintln!("error occurred while generating instructions: {:?}", e);
|
|
|
|
|
+ let mut config = Config::default();
|
|
|
|
|
+ *config.git_mut().enabled_mut() = false;
|
|
|
|
|
+ vergen(config)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ Ok(())
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|