mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-13 13:52:27 +00:00
Move to Pl3x DL API V2 (#977)
This commit is contained in:
parent
34d67d6018
commit
6a3a0465a4
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ isDebugging && set -x
|
||||||
: ${FORCE_REDOWNLOAD:=false}
|
: ${FORCE_REDOWNLOAD:=false}
|
||||||
|
|
||||||
if [[ ${PURPUR_BUILD} == LATEST ]]; then
|
if [[ ${PURPUR_BUILD} == LATEST ]]; then
|
||||||
PURPUR_BUILD=$(curl -fsSL "https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}" |
|
PURPUR_BUILD=$(curl -fsSL "https://api.pl3x.net/v2/purpur/${VANILLA_VERSION}" |
|
||||||
jq -r '.builds.latest' || echo "")
|
jq -r '.builds.latest' || echo "")
|
||||||
if [[ -z ${PURPUR_BUILD} ]]; then
|
if [[ -z ${PURPUR_BUILD} ]]; then
|
||||||
log "ERROR: Failed to locate a Purpur build for ${VANILLA_VERSION}."
|
log "ERROR: Failed to locate a Purpur build for ${VANILLA_VERSION}."
|
||||||
|
@ -22,7 +22,7 @@ fi
|
||||||
export SERVER="purpur-${VANILLA_VERSION}-${PURPUR_BUILD}.jar"
|
export SERVER="purpur-${VANILLA_VERSION}-${PURPUR_BUILD}.jar"
|
||||||
|
|
||||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||||
downloadUrl="https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}/${PURPUR_BUILD}/download"
|
downloadUrl="https://api.pl3x.net/v2/purpur/${VANILLA_VERSION}/${PURPUR_BUILD}/download"
|
||||||
log "Downloading Purpur from $downloadUrl ..."
|
log "Downloading Purpur from $downloadUrl ..."
|
||||||
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
|
|
Loading…
Reference in a new issue