[skip ci] Update docker image to use updated releases

This commit is contained in:
breadbyte 2024-08-14 18:22:05 +08:00 committed by GitHub
parent ca966a464c
commit 8bdb20a22c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,20 +10,16 @@ else
# Use the provided version tag or get the latest release tag
RELEASE_TAG=${MCC_VERSION:-$(curl -s -v https://github.com/MCCTeam/Minecraft-Console-Client/releases/latest 2>&1 | grep -i location: | tr -d '\r' | cut -d/ -f8)}
# Taken from https://stackoverflow.com/a/70369688
ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/)
# Delete the old build
[ -e MinecraftClient-linux.zip ] && rm -- MinecraftClient-linux.zip
[ -e MinecraftClient ] && rm -- MinecraftClient
echo "Donwloading MinecraftClient for ${RELEASE_TAG}"
echo "Donwloading MinecraftClient for ${RELEASE_TAG}-${ARCH}"
# Download the specified build or the latest one
curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG}/MinecraftClient-${MCC_PLATFORM:=linux}.zip --output MinecraftClient-linux.zip
# Unzip it
unzip MinecraftClient-linux.zip
# Remove the ZIP
rm -- MinecraftClient-linux.zip
curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG}/MinecraftClient-${RELEASE_TAG}-${MCC_PLATFORM:=linux}-${ARCH} --output MinecraftClient
fi
# Set Executable