mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-24 19:48:55 +00:00
Used json-path of image helper get for vanilla lookup
This commit is contained in:
1 parent
57d9da96a1
commit
63b919f1a9
3 files changed
+11
-5
No files matched your search
+8
-2
@@ -66,10 +66,16 @@ export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.js
|
||||
|
||||
case "X$VERSION" in
|
||||
X|XLATEST|Xlatest)
|
||||
VANILLA_VERSION=$(get "$VERSIONS_JSON" | jq -r '.latest.release')
|
||||
if ! VANILLA_VERSION=$(get --json-path '$.latest.release' "$VERSIONS_JSON"); then
|
||||
log "ERROR: version lookup failed: $VANILLA_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
XSNAPSHOT|Xsnapshot)
|
||||
VANILLA_VERSION=$(get "$VERSIONS_JSON" | jq -r '.latest.snapshot')
|
||||
if ! VANILLA_VERSION=$(get --json-path '$.latest.snapshot' "$VERSIONS_JSON"); then
|
||||
log "ERROR: version lookup failed: $VANILLA_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
VANILLA_VERSION=$VERSION
|
||||
|
||||
Reference in new issue
Block a user