From 6be10bba5aa3703898dd4ba9f44711778869f322 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 19 Apr 2022 23:45:34 -0700 Subject: [PATCH] Specify rerun-if-changed files manually --- build/main.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/build/main.rs b/build/main.rs index b05e1bd..9407947 100644 --- a/build/main.rs +++ b/build/main.rs @@ -1,20 +1,10 @@ -use std::fs; - -use anyhow::Context; use proc_macro2::{Ident, Span}; mod block; pub fn main() -> anyhow::Result<()> { - // If any of the files in the data directory are modified, rerun the build - // script. - for entry in fs::read_dir("data")? { - let entry = entry?; - if entry.metadata()?.is_file() { - let buf = entry.path(); - let path = buf.to_str().context("bad file name")?; - println!("cargo:rerun-if-changed={path}"); - } + for file in ["blocks.json"] { + println!("cargo:rerun-if-changed=data/{file}"); } block::build()?;