mirror of
https://github.com/DerTyp7/glassminers-server-docker.git
synced 2025-10-28 12:22:15 +01:00
Added environment variable to set version of server
This commit is contained in:
@@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y wget
|
||||
ENV MAX_LOGS="20"
|
||||
ENV LOG_DIR="/var/log/glassminers"
|
||||
ENV LOG_DATE_FORMAT="%Y-%m-%d-%H-%M-%S"
|
||||
ENV VERSION="latest"
|
||||
|
||||
RUN mkdir -p ${LOG_DIR}
|
||||
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "[Info] Downloading latest server version..."
|
||||
wget https://github.com/surrealtm/Glassminers/releases/latest/download/GMServer.out -O "server.out"
|
||||
VERSION=${VERSION:- "latest"}
|
||||
|
||||
echo "[Info] Downloading server (${VERSION})..."
|
||||
|
||||
if [ "$VERSION" = "latest" ]; then
|
||||
wget https://github.com/surrealtm/Glassminers/releases/latest/download/GMServer.out -O "server.out"
|
||||
|
||||
else
|
||||
wget https://github.com/surrealtm/Glassminers/releases/download/${VERSION}/GMServer.out -O "server.out"
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "[Error] Download failed! Aborting."
|
||||
|
||||
Reference in New Issue
Block a user