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 a8a437a commit 8c39575Copy full SHA for 8c39575
1 file changed
build.rs
@@ -1,4 +1,13 @@
1
fn main() {
2
+ println!("cargo:rerun-if-changed=.git/HEAD");
3
+ println!("cargo:rerun-if-changed=.git/packed-refs");
4
+
5
+ if let Ok(head) = std::fs::read_to_string(".git/HEAD") {
6
+ if let Some(ref_name) = head.strip_prefix("ref: ") {
7
+ println!("cargo:rerun-if-changed=.git/{}", ref_name.trim());
8
+ }
9
10
11
let git_hash = std::process::Command::new("git")
12
.args(["rev-parse", "--short", "HEAD"])
13
.output()
0 commit comments