Only rebuild download JSON on change (#13261)

By default, Cargo runs the build script if any file in the package
changes
(https://doc.rust-lang.org/cargo/reference/build-scripts.html#change-detection).
In our case, we only need to rerun it if `download-metadata.json`
changed.
This commit is contained in:
konsti
2025-05-02 14:49:34 +02:00
committed by GitHub
parent 360a335e7f
commit b442aae80e
+2 -1
View File
@@ -21,7 +21,8 @@ fn process_json(data: &serde_json::Value) -> serde_json::Value {
}
fn main() {
let version_metadata = Path::new("download-metadata.json");
let version_metadata = "download-metadata.json";
println!("cargo::rerun-if-changed={version_metadata}");
let target = Path::new("src/download-metadata-minified.json");
let json_data: serde_json::Value = serde_json::from_str(