mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
parent
09cc5003cd
commit
e9d3512383
@ -8,14 +8,14 @@ isDebugging && set -x
|
||||
|
||||
IFS=$'\n\t'
|
||||
|
||||
if [ "${VANILLA_VERSION%.*}" != "1.18" ] && [ "${VANILLA_VERSION%.*}" != "1.17" ]; then
|
||||
if [[ "${VANILLA_VERSION}" != "1.18" ]] && [[ "${VANILLA_VERSION}" != "1.17" ]]; then
|
||||
log "ERROR: Pufferfish server type only supports versions 1.18 or 1.17, use PUFFERFISH_BUILD to select the the correct build 47 => 1.18.1, 50 => 1.18.2 etc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: "${PUFFERFISH_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
PUFFERFISH_BUILD_JSON=$(curl -X GET -s "https://ci.pufferfish.host/job/Pufferfish-${VANILLA_VERSION%.*}/${PUFFERFISH_BUILD}/api/json")
|
||||
PUFFERFISH_BUILD_JSON=$(curl -X GET -s "https://ci.pufferfish.host/job/Pufferfish-${VANILLA_VERSION}/${PUFFERFISH_BUILD}/api/json")
|
||||
# Example: "url": "https://ci.pufferfish.host/job/Pufferfish-1.18/50/",
|
||||
PUFFERFISH_BUILD_URL=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.url // empty' )
|
||||
# Example: "fileName": "pufferfish-paperclip-1.18.2-R0.1-SNAPSHOT-reobf.jar",
|
||||
@ -31,7 +31,7 @@ for f in pufferfish-*.jar; do
|
||||
[[ $f != "$SERVER" ]] && rm "$f"
|
||||
done
|
||||
|
||||
if [ ! -f "$SERVER" ] || isTrue "${FORCE_REDOWNLOAD:-false}"; then
|
||||
if [[ ! -f "$SERVER" ]] || isTrue "${FORCE_REDOWNLOAD:-false}"; then
|
||||
log "Downloading Pufferfish from $PUFFERFISH_BUILD_DOWNLOAD_URL ..."
|
||||
if ! get -o "$SERVER" "$PUFFERFISH_BUILD_DOWNLOAD_URL"; then
|
||||
log "ERROR: failed to download from $PUFFERFISH_BUILD_DOWNLOAD_URL (status=$?)"
|
||||
|
Loading…
Reference in New Issue
Block a user