tauri/tooling/cli.rs/build.rs
Lucas Fernandes Nogueira 4a031add69
feat(core): expose set_activation_policy, closes #2258 (#2420)
* feat(core): expose `set_activation_policy`, closes #2258

* fix change file [skip ci]

* Update .changes/runtime-set-activation-policy.md [skip ci]

Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>

* clippy

* allow unused mut on example

Co-authored-by: Amr Bashir <48618675+amrbashir@users.noreply.github.com>
2021-08-13 13:25:31 -03:00

26 lines
607 B
Rust

// Copyright 2019-2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use std::{
env::current_dir,
error::Error,
fs::File,
io::{BufWriter, Write},
};
mod config_definition;
pub fn main() -> Result<(), Box<dyn Error>> {
let schema = schemars::schema_for!(config_definition::Config);
let schema_file_path = current_dir()?.join("schema.json");
let mut schema_file = BufWriter::new(File::create(&schema_file_path)?);
write!(
schema_file,
"{}",
serde_json::to_string_pretty(&schema).unwrap()
)?;
Ok(())
}