Tobias Reisinger
b742f0f8d6
Some checks failed
/ build-artifacts (arm-unknown-linux-gnueabihf) (push) Failing after 9m27s
15 lines
384 B
Rust
15 lines
384 B
Rust
use std::process::{exit, Command};
|
|
|
|
fn main() {
|
|
println!("cargo:rerun-if-changed=./api.v1.yaml");
|
|
let output = Command::new("sh")
|
|
.arg("-c")
|
|
.arg("yq . < ./api.v1.yaml > $OUT_DIR/api.v1.json")
|
|
.output()
|
|
.expect("Failed to convert api documentation to json");
|
|
|
|
if !output.status.success() {
|
|
eprintln!("Error: {}", String::from_utf8_lossy(&output.stderr));
|
|
exit(1);
|
|
}
|
|
}
|