mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-21 22:32:39 +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
+1
-1
@@ -60,7 +60,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
ARG MC_HELPER_VERSION=1.5.3
|
ARG MC_HELPER_VERSION=1.6.1
|
||||||
RUN curl -fsSL https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
RUN curl -fsSL https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||||
| tar -C /usr/share -zxf - \
|
| tar -C /usr/share -zxf - \
|
||||||
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
|
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
|
||||||
|
|||||||
+8
-2
@@ -66,10 +66,16 @@ export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.js
|
|||||||
|
|
||||||
case "X$VERSION" in
|
case "X$VERSION" in
|
||||||
X|XLATEST|Xlatest)
|
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)
|
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
|
VANILLA_VERSION=$VERSION
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# shellcheck source=start-utils
|
# shellcheck source=start-utils
|
||||||
. ${SCRIPTS:-/}start-utils
|
. "${SCRIPTS:-/}start-utils"
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
|||||||
fi
|
fi
|
||||||
debug "Found version manifest at $versionManifestUrl"
|
debug "Found version manifest at $versionManifestUrl"
|
||||||
|
|
||||||
serverDownloadUrl=$(get "${versionManifestUrl}" | jq --raw-output '.downloads.server.url')
|
serverDownloadUrl=$(get --json-path '$.downloads.server.url' "${versionManifestUrl}")
|
||||||
result=$?
|
result=$?
|
||||||
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)"
|
||||||
|
|||||||
Reference in new issue
Block a user