Skip to content

Commit

Permalink
fix version string
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell R. Vollger committed Dec 11, 2024
1 parent ffbff67 commit 2fadb5d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ fn vergen() -> Result<(), Box<dyn Error>> {
let git2 = Git2Builder::all_git()?;
let cargo = CargoBuilder::all_cargo()?;

Emitter::default()
let status = Emitter::default()
.add_instructions(&build)?
.add_instructions(&git2)?
.add_instructions(&cargo)?
.emit()?;
.fail_on_error()
.emit();

// set the env variable myself if the status failed
if status.is_err() {
eprintln!("Failed to get version information from git");
eprintln!("Likely building a published version from cargo or bioconda.");
std::env::set_var("VERGEN_GIT_DESCRIBE", "unknown");
}

Ok(())
}
Expand Down

0 comments on commit 2fadb5d

Please sign in to comment.