Files
reminder-bot/build.rs
T

34 lines
952 B
Rust
Raw Normal View History

2024-03-03 13:21:06 +00:00
use std::{path::Path, process::Command};
2023-05-07 21:08:59 +01:00
fn main() {
println!("cargo:rerun-if-changed=migrations");
2024-03-03 13:21:06 +00:00
println!("cargo:rerun-if-changed=reminder-dashboard");
Command::new("npm")
.arg("run")
.arg("build")
.current_dir(Path::new("reminder-dashboard"))
2026-05-25 20:29:14 +01:00
.env("VITE_VERSION", env!("CARGO_PKG_VERSION"))
2024-03-03 13:21:06 +00:00
.spawn()
2026-05-25 20:29:14 +01:00
.expect("Failed to build NPM")
.wait()
.expect("Failed to wait for NPM build");
2025-11-05 18:52:36 +00:00
Command::new("cp")
.arg("reminder-dashboard/dist/index.html")
.arg("static/index.html")
.spawn()
2026-05-25 20:29:14 +01:00
.expect("Failed to copy index.html")
.wait()
.expect("Failed to wait for index.html copy");
2025-11-05 18:52:36 +00:00
Command::new("cp")
.arg("-r")
.arg("reminder-dashboard/dist/static/assets")
.arg("static/")
.spawn()
2026-05-25 20:29:14 +01:00
.expect("Failed to copy assets")
.wait()
.expect("Failed to wait for assets copy");
2023-05-07 21:08:59 +01:00
}