We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71b66a2 commit 103ec88Copy full SHA for 103ec88
build.rs
@@ -47,12 +47,14 @@ fn main() {
47
// Make the current git hash available to the build.
48
if let Some(rev) = git_revision_hash() {
49
println!("cargo:rustc-env=RIPGREP_BUILD_GIT_HASH={}", rev);
50
+ println!("cargo:rerun-if-changed=.git/index");
51
+ println!("cargo:rerun-if-changed=.git/HEAD");
52
}
53
54
55
fn git_revision_hash() -> Option<String> {
56
let result = process::Command::new("git")
- .args(&["rev-parse", "--short=10", "HEAD"])
57
+ .args(&["describe", "--tags", "--match=[0-9]*", "--dirty=+"])
58
.output();
59
result.ok().and_then(|output| {
60
let v = String::from_utf8_lossy(&output.stdout).trim().to_string();
0 commit comments