PlantCtrl/rust/build.rs

26 lines
732 B
Rust
Raw Normal View History

use std::process::Command;
2023-11-27 01:07:07 +01:00
use vergen::EmitBuilder;
2023-11-20 00:05:47 +01:00
fn main() {
println!("cargo:rerun-if-changed=./src/src_webpack");
2024-01-07 14:33:02 +01:00
Command::new("rm")
.arg("./src/webserver/bundle.js")
.output()
.expect("failed to execute process");
let output = Command::new("npx")
.arg("webpack")
.current_dir("./src_webpack")
.output()
.expect("failed to execute process");
println!("status: {}", output.status);
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
println!("stderr: {}", String::from_utf8_lossy(&output.stderr));
2024-01-07 14:33:02 +01:00
assert!(output.status.success());
2023-11-20 00:05:47 +01:00
embuild::espidf::sysenv::output();
2023-11-27 01:07:07 +01:00
let _ = EmitBuilder::builder().all_git().emit();
2024-01-07 14:33:02 +01:00
}