Skip to content

Commit

Permalink
try fix dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed Nov 28, 2023
1 parent 544ab59 commit cd4c55f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fn main() {
let git_hash = git_cmd(&["rev-parse", "HEAD"]).unwrap_or("".to_string());
let git_tag = git_cmd(&["tag", "HEAD"]).unwrap_or("".to_string());
let is_dirty = git_cmd(&["diff"]).map(|o| o.trim().len() > 0) == Some(true);

println!("cargo:rustc-env=GIT_HASH={git_hash}");
println!("cargo:rustc-env=GIT_TAG={git_tag}");
println!("cargo:rustc-env=GIT_DIRTY={is_dirty}");
Expand Down

0 comments on commit cd4c55f

Please sign in to comment.