diff --git a/Dockerfile b/Dockerfile index 00cc0aea..e1fee7b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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}} \ --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 \ | tar -C /usr/share -zxf - \ && ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin diff --git a/start-configuration b/start-configuration index 5d425a15..5f3fa21a 100755 --- a/start-configuration +++ b/start-configuration @@ -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 diff --git a/start-deployVanilla b/start-deployVanilla index c1daed64..0b618800 100755 --- a/start-deployVanilla +++ b/start-deployVanilla @@ -1,7 +1,7 @@ #!/bin/bash # shellcheck source=start-utils -. ${SCRIPTS:-/}start-utils +. "${SCRIPTS:-/}start-utils" isDebugging && set -x set -o pipefail @@ -22,7 +22,7 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then fi debug "Found version manifest at $versionManifestUrl" - serverDownloadUrl=$(get "${versionManifestUrl}" | jq --raw-output '.downloads.server.url') + serverDownloadUrl=$(get --json-path '$.downloads.server.url' "${versionManifestUrl}") result=$? if [ $result != 0 ]; then log "ERROR failed to obtain version manifest from $versionManifestUrl ($result)"