docker-minecraft-server/minecraft-server/start-deployPaper
Michael Reichenbach a316bd8f95 fix(minecraft-server): filter env replacement file
Environment variable replacement now only affects matching file types.

Closes #299
2019-03-29 12:11:42 +01:00

51 lines
1.1 KiB
Bash

#!/bin/bash
export SERVER=paper_server.jar
if [ ! -f $SERVER ]; then
job=Paper
case "${VANILLA_VERSION}" in
1.13.*)
job=Paper-1.13
build="lastSuccessfulBuild"
;;
1.12.2)
build="lastSuccessfulBuild";;
1.11.2)
build="1104";;
1.10.2)
build="916";;
1.9.4)
build="773";;
1.9.2)
build="727";;
1.9)
build="612";;
1.8.8)
build="443";;
*)
build="nosupp";;
esac
if [ $build != "nosupp" ]; then
rm -f $SERVER
downloadUrl=${PAPER_DOWNLOAD_URL:-https://papermc.io/ci/job/$job/$build/artifact/paperclip.jar}
echo "Downloading Paper $VANILLA_VERSION from $downloadUrl ..."
curl -fsSL -o $SERVER "$downloadUrl"
if [ ! -f $SERVER ]; then
echo "ERROR: failed to download from $downloadUrl (status=$?)"
exit 3
fi
else
echo "ERROR: Version $VERSION is not supported for $TYPE"
echo " Refer to https://papermc.io/ci/"
echo " for supported versions"
exit 2
fi
fi
# Normalize on Spigot for operations below
export TYPE=SPIGOT
# Continue to Final Setup
exec /start-finalSetup01World $@