Skip to content

Commit 4237f40

Browse files
authored
Merge pull request #2581 from sinkuu/build_script
Rerun build.rs only when .git/HEAD or CFG_RELEASE_CHANNEL is changed
2 parents a318bc8 + 1d3bc68 commit 4237f40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ use std::path::PathBuf;
1515
use std::process::Command;
1616

1717
fn main() {
18+
println!("cargo:rerun-if-changed=.git/HEAD");
19+
println!("cargo:rerun-if-env-changed=CFG_RELEASE_CHANNEL");
20+
1821
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
1922

2023
File::create(out_dir.join("commit-info.txt"))

0 commit comments

Comments
 (0)