~starkingdoms/starkingdoms

fe0449a7c987b83d0788de569fd8e8acda2042fe — core 2 years ago db6a7a0
fix! swap out game server too
2 files changed, 2 insertions(+), 2 deletions(-)

M spacetime_rs/src/commands/docker.rs
M spacetime_rs/src/main.rs
M spacetime_rs/src/commands/docker.rs => spacetime_rs/src/commands/docker.rs +1 -1
@@ 32,7 32,7 @@ fn _build(img: &str, channel: &str, root: &PathBuf) -> Result<(), Box<dyn Error>
        let index_html_src = fs::read_to_string(&index_html_path)?;
        let index_html_patched = find_and_replace(&index_html_src, &[
            format!("s/let api_server = \"http:\\/\\/localhost:8080\";/let api_server = \"https:\\/\\/api.{}.{}\";/", a, b),
            format!("s/let servers = [\"localhost:3000\"];/let servers = [\"{}.{}\"];/", a, b)
            format!("s/let servers = \\[\"localhost:3000\"\\];/let servers = [\"{}.{}\"];/", a, b)
        ])?;

        fs::write(&index_html_path, index_html_patched.as_bytes())?;

M spacetime_rs/src/main.rs => spacetime_rs/src/main.rs +1 -1
@@ 243,7 243,7 @@ impl BuildCommandManager {
    }

    pub fn exec(&self, args: Vec<String>) -> Result<(), Box<dyn Error>> {
        if args.len() < 2 || args[1] == "help" || args[1] == "h" {
        if args.len() < 3 || args[1] == "help" || args[1] == "h" {
            self.help();
            return Ok(());
        }