tauri/core/tauri-config-schema/build.rs
chip b32295de18
prevent unnecessary rebuilds when working in the cargo workspace (#10442)
* hash codegen image cache output

* remove left over dbg! statement

* prevent info.plist from workspace rebuilds

* prevent schema generation from workspace rebuilds

* use new `Cached` struct in `CachedIcon`

* fmt

* use full import for cached plist

* use `to_vec()` for raw icons
2024-08-02 07:30:02 -03:00

18 lines
577 B
Rust

// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use std::{error::Error, path::PathBuf};
use tauri_utils::{config::Config, write_if_changed};
pub fn main() -> Result<(), Box<dyn Error>> {
let schema = schemars::schema_for!(Config);
let schema = serde_json::to_string_pretty(&schema)?;
let out = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR")?);
for path in ["schema.json", "../../tooling/cli/schema.json"] {
write_if_changed(out.join(path), &schema)?;
}
Ok(())
}