Skip to content

Commit

Permalink
Remove frontend building from build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Threated committed Oct 10, 2023
1 parent a0fbb61 commit 39c78e4
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions proxy/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,4 @@ fn main() {
build_data::set_BUILD_TIME();
build_data::no_debug_rebuilds();
println!("cargo:rustc-env=SAMPLY_USER_AGENT=Samply.Beam.{}/{}", env!("CARGO_PKG_NAME"), version());

// Compile the frontend with npm but not when we are using cross in the CI because we can compile it ahead of time and dont need to install npm in the docker containers that cross will spawn
if cfg!(feature = "monitor") && option_env!("CROSS_RUNNER").is_none() {
use std::process::Command;
std::env::set_current_dir("./monitor").expect("monitor directory has been deleted");
Command::new("npm")
.arg("install")
.spawn()
.expect("npm needs to be installed to compile monitoring feature")
.wait()
.expect("Failed to run npm install command");
Command::new("npm")
.args([ "run", "build" ])
.spawn()
.expect("npm needs to be installed to compile monitoring feature")
.wait()
.expect("Failed to run npm run build command");
}
}

0 comments on commit 39c78e4

Please sign in to comment.