Skip to content

Commit

Permalink
Merge pull request #1535 from mintlayer/fix/git-version-output
Browse files Browse the repository at this point in the history
Tolerate not having git installed for wallet version
  • Loading branch information
TheQuantumPhysicist committed Feb 6, 2024
2 parents d3ce09a + 7a928b1 commit 302d68f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions wallet/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ fn main() {
.output()
.map(|out| String::from_utf8_lossy(&out.stdout).trim().to_string());

if let Ok(git_hash) = git_head_hash {
println!("cargo:rustc-env=GIT_HEAD_HASH={}", git_hash);
}
if let Ok(git_tree_clean) = git_tree_clean {
println!("cargo:rustc-env=GIT_TREE_CLEAN={}", git_tree_clean);
}
println!(
"cargo:rustc-env=GIT_HEAD_HASH={}",
git_head_hash.unwrap_or("".to_string())
);
println!(
"cargo:rustc-env=GIT_TREE_CLEAN={}",
git_tree_clean.unwrap_or("".to_string())
);
}

0 comments on commit 302d68f

Please sign in to comment.