Skip to content

Commit

Permalink
fix: version
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugoch committed Oct 17, 2024
1 parent cd51d55 commit e17e119
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ use vergen_gitcl::{Emitter, GitclBuilder};

fn main() -> Result<(), Box<dyn Error>> {
// Try to get the git sha from the local git repository
let gitcl = match GitclBuilder::all_git() {
Ok(gitcl) => gitcl,
match GitclBuilder::all_git() {
Ok(gitcl) => {
if Emitter::default()
.fail_on_error()
.add_instructions(&gitcl)?
.emit()
.is_err()
{
fallback_git_sha();
}
}
Err(_) => {
fallback_git_sha();
return Ok(());
}
};
if Emitter::default()
.fail_on_error()
.add_instructions(&gitcl)?
.emit()
.is_err()
{
fallback_git_sha();
}
Ok(())
}

Expand Down

0 comments on commit e17e119

Please sign in to comment.