From aae14b24e0c462a834ef637f7e714bcffeceb14d Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 4 Aug 2023 23:10:27 -0700 Subject: [PATCH] build: in cli build script, fix relative path to root Since the recent move of `builds.rs` to `cli/build.rs`, incremental builds re-calcuate the version number and thus result in some re-compilation and lots of re-linking. --- cli/build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/build.rs b/cli/build.rs index 0b3f473b45..19974fefde 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -55,14 +55,14 @@ fn get_git_hash() -> Option { .output() { if output.status.success() { - println!("cargo:rerun-if-changed=.jj/repo/op_heads/heads/"); + println!("cargo:rerun-if-changed=../.jj/repo/op_heads/heads/"); return Some(String::from_utf8(output.stdout).unwrap()); } } if let Ok(output) = Command::new("git").args(["rev-parse", "HEAD"]).output() { if output.status.success() { - println!("cargo:rerun-if-changed=.git/HEAD"); + println!("cargo:rerun-if-changed=../.git/HEAD"); let line = str::from_utf8(&output.stdout).unwrap(); return Some(line.trim_end().to_owned()); }