forked from mirrors/jj
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.
This commit is contained in:
parent
0075174308
commit
aae14b24e0
1 changed files with 2 additions and 2 deletions
|
@ -55,14 +55,14 @@ fn get_git_hash() -> Option<String> {
|
|||
.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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue