Skip to content

Commit

Permalink
Make watched files in build script more granular
Browse files Browse the repository at this point in the history
  • Loading branch information
d0cd committed Nov 19, 2024
1 parent 4323c1e commit 53319d9
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,26 @@ fn check_file_licenses<P: AsRef<Path>>(path: P) {
}
}

// Re-run upon any changes to the workspace.
println!("cargo:rerun-if-changed=.");
// Watch the directories that contain Rust source files
println!("cargo:rerun-if-changed=compiler");
println!("cargo:rerun-if-changed=docs");
println!("cargo:rerun-if-changed=errors");
println!("cargo:rerun-if-changed=examples");
println!("cargo:rerun-if-changed=leo");
println!("cargo:rerun-if-changed=tests");
println!("cargo:rerun-if-changed=utils");

// Watch the build script itself
println!("cargo:rerun-if-changed=build.rs");

// Watch the license header file
println!("cargo:rerun-if-changed=.resources/license_header");

// Watch the Cargo.toml file
println!("cargo:rerun-if-changed=Cargo.toml");

// Watch the Cargo.lock file
println!("cargo:rerun-if-changed=Cargo.lock");
}

// The build script; it currently only checks the licenses.
Expand Down

0 comments on commit 53319d9

Please sign in to comment.