Avoid re-running build

This commit is contained in:
Ajeet D'Souza 2021-05-08 08:33:56 +05:30
parent 9d3d88b771
commit e150addf7a
1 changed files with 7 additions and 0 deletions

View File

@ -41,5 +41,12 @@ fn generate_completions() {
fn main() { fn main() {
let version = git_version().unwrap_or_else(crate_version); let version = git_version().unwrap_or_else(crate_version);
println!("cargo:rustc-env=ZOXIDE_VERSION={}", version); println!("cargo:rustc-env=ZOXIDE_VERSION={}", version);
// Since we are generating completions in the package directory, we need to
// set this so that Cargo doesn't rebuild every time.
println!("cargo:rerun-if-changed=src");
println!("cargo:rerun-if-changed=templates");
println!("cargo:rerun-if-changed=tests");
generate_completions(); generate_completions();
} }