From c5b579b8dbf2aadac85d0bff8fe0be3442acd2ad Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Sat, 3 Jun 2023 15:03:41 +0200 Subject: [PATCH] fix(ci): use alpine image for builds --- .woodpecker/build.yml | 2 +- src/server/command.rs | 2 +- src/server/process.rs | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 12a09df..f6863f0 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -10,7 +10,7 @@ branches: pipeline: build: - image: 'rust:1.70' + image: 'rust:1.70-alpine3.18' commands: - cargo build --verbose - cargo test --verbose diff --git a/src/server/command.rs b/src/server/command.rs index 10864dc..456841d 100644 --- a/src/server/command.rs +++ b/src/server/command.rs @@ -1,9 +1,9 @@ use crate::server::ServerProcess; +use std::fmt; use std::fs::File; use std::io::Write; use std::path::{Path, PathBuf}; use std::process::{Child, Command, Stdio}; -use std::fmt; pub enum ServerType { Paper, diff --git a/src/server/process.rs b/src/server/process.rs index a633b4e..ffc8982 100644 --- a/src/server/process.rs +++ b/src/server/process.rs @@ -79,8 +79,10 @@ impl ServerProcess { tar.append_dir_all("worlds", &self.world_dir)?; // We don't store all files in the config, as this would include caches - tar.append_path_with_name(self.config_dir.join("server.properties"), "config/server.properties")?; - + tar.append_path_with_name( + self.config_dir.join("server.properties"), + "config/server.properties", + )?; // We add a file to the backup describing for what version it was made let info = format!("{} {}", self.type_, self.version);