fix changes to .ftl and .proto files not being picked up by 'cargo check'

This commit is contained in:
Damien Elmes 2021-04-01 21:09:42 +10:00
parent 4e9a5ec5ea
commit 7df128a103
2 changed files with 5 additions and 0 deletions

View file

@ -83,6 +83,7 @@ pub fn write_backend_proto_rs() {
backend_proto = PathBuf::from("backend.proto");
proto_dir = PathBuf::from(".");
}
println!("cargo:rerun-if-changed={}", backend_proto.to_str().unwrap());
let mut config = prost_build::Config::new();
config

View file

@ -59,6 +59,10 @@ fn add_folder(map: &mut TranslationsByLang, folder: &Path, lang: &str) {
entry
);
map_entry.entry(module).or_default().push_str(&text);
// when building under Bazel changes to the .ftl files will automatically
// be picked up, but when building under Cargo we need to declare the files
// that should trigger a rebuild
println!("cargo:rerun-if-changed={}", entry.path().to_str().unwrap());
}
}