Fix change detection bug in build script

This commit is contained in:
Ryan 2022-08-09 17:35:49 -07:00
parent d4d169d130
commit d61c3f1f6f

View file

@ -10,16 +10,14 @@ mod entity;
mod entity_event;
pub fn main() -> anyhow::Result<()> {
println!("cargo:rerun-if-changed=extracted/");
let generators = [
(entity::build as fn() -> _, "entity.rs"),
(entity_event::build, "entity_event.rs"),
(block::build, "block.rs"),
];
for (_, file_name) in generators {
println!("cargo:rerun-if-changed=extracted/{file_name}");
}
let out_dir = env::var_os("OUT_DIR").context("can't get OUT_DIR env var")?;
for (g, file_name) in generators {