diff --git a/dsc-bicep-ext/build.rs b/dsc-bicep-ext/build.rs index ae8c430da..7d66e7fec 100644 --- a/dsc-bicep-ext/build.rs +++ b/dsc-bicep-ext/build.rs @@ -4,6 +4,10 @@ use std::{env, path::PathBuf}; fn main() -> Result<(), Box> { + // Prevent this build script from rerunning unless the proto file or build script changes. + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-changed=proto/bicep.proto"); + let descriptor_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("bicep.bin"); tonic_prost_build::configure()