M spacetime_rs/src/commands/client.rs => spacetime_rs/src/commands/client.rs +6 -0
@@ 27,6 27,12 @@ pub fn client_protobuf(_: Vec<String>, root: PathBuf) -> Result<(), Box<dyn Erro
}
pub fn build_client_prod(_: Vec<String>, root: PathBuf) -> Result<(), Box<dyn Error>> {
+ let mut config_file_writer = create_writer(&root)?;
+
+ configure_client(&mut config_file_writer, &root)?;
+
+ exec_ninja(&root, vec!["asset".to_string()])?;
+
exec("yarn", &root.join("client"), vec![])?;
exec("yarn", &root.join("client"), vec!["build".to_string()])
}
M spacetime_rs/src/commands/docker.rs => spacetime_rs/src/commands/docker.rs +0 -7
@@ 16,13 16,6 @@ fn _build(img: &str, channel: &str, root: &PathBuf) -> Result<(), Box<dyn Error>
} else if img == "api" {
build_api_prod(vec![], root.clone())?;
} else if img == "web" {
- // we need to swap out the urls
- // TODO
- // for now i am just adding all three to all clients
-
- // "s/let api_server = \"http:\\/\\/localhost:8080\";/let api_server = \"https:\\/\\/api.${1}.${2}\";/" "$SCRIPT_DIR/client/index.html"
- // "s/let servers = \[\"localhost:3000\"\];/let servers = [\"${1}.${2}\"];/" "$SCRIPT_DIR/client/index.html"
-
let (a, b) = match channel {
"stable" => ("starkingdoms", "tk"),
_ => (channel, "starkingdoms.io")