Added a second container that runs nightly server builds.

This commit is contained in:
surrealtm
2025-08-20 21:28:02 +02:00
parent dd943bcb8e
commit 0e3ba7ab8a
4 changed files with 49 additions and 10 deletions

View File

@@ -1,13 +1,23 @@
#!/bin/bash
echo "[Info] Downloading latest server version..."
wget https://github.com/surrealtm/Glassminers/releases/latest/download/GMServer.out -O "server.out"
echo "[Info] Downloading server executable..."
LOCAL_EXECUTABLE_NAME="server_$1.out"
if [ "$1" = "stable" ]; then
wget https://github.com/surrealtm/Glassminers/releases/latest/download/GMServer.out -O $LOCAL_EXECUTABLE_NAME
elif [ "$1" = "nightly" ]; then
wget https://github.com/surrealtm/Glassminers/raw/refs/heads/main/run_tree/server.out -O $LOCAL_EXECUTABLE_NAME
else
echo "[Error] Please provide either 'nightly' or 'stable' as an argument to this script."
exit 1
fi
if [ $? -ne 0 ]; then
echo "[Error] Download failed! Aborting."
exit 1
fi
chmod 777 ./server.out
chmod 777 $LOCAL_EXECUTABLE_NAME
echo "[Info] Download completed successfully."

View File

@@ -4,7 +4,7 @@ MAX_LOGS=${MAX_LOGS:-20}
LOG_DIR=${LOG_DIR:-"/var/log/glassminers"}
LOG_DATE_FORMAT=${LOG_DATE_FORMAT:-"%Y-%m-%d-%H-%M-%S"}
EXEC=./server.out
EXEC=./server_$1.out
TIMESTAMP=$(date +"$LOG_DATE_FORMAT")
delete_old_logs() {