mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-12 13:22:28 +00:00
Changed handling of unrecognized VERSION and detect absent server in meta json
For #590
This commit is contained in:
parent
747c188824
commit
21ee5e2401
2 changed files with 4 additions and 4 deletions
|
@ -71,11 +71,8 @@ case "X$VERSION" in
|
||||||
XSNAPSHOT|Xsnapshot)
|
XSNAPSHOT|Xsnapshot)
|
||||||
VANILLA_VERSION=$(curl -fsSL $VERSIONS_JSON | jq -r '.latest.snapshot')
|
VANILLA_VERSION=$(curl -fsSL $VERSIONS_JSON | jq -r '.latest.snapshot')
|
||||||
;;
|
;;
|
||||||
X[1-9]*)
|
|
||||||
VANILLA_VERSION=$VERSION
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
VANILLA_VERSION=$(curl -fsSL $VERSIONS_JSON | jq -r '.latest.release')
|
VANILLA_VERSION=$VERSION
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
export VANILLA_VERSION
|
export VANILLA_VERSION
|
||||||
|
|
|
@ -26,6 +26,9 @@ if [ ! -e $SERVER ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
if [ $result != 0 ]; then
|
if [ $result != 0 ]; then
|
||||||
log "ERROR failed to obtain version manifest from $versionManifestUrl ($result)"
|
log "ERROR failed to obtain version manifest from $versionManifestUrl ($result)"
|
||||||
exit 1
|
exit 1
|
||||||
|
elif [ $serverDownloadUrl = null ]; then
|
||||||
|
log "ERROR version $VANILLA_VERSION does not provide a server download"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
debug "Downloading server from $serverDownloadUrl"
|
debug "Downloading server from $serverDownloadUrl"
|
||||||
|
|
Loading…
Reference in a new issue