diff --git a/Dockerfile b/Dockerfile index b391f01fc23..1be78a002eb 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.10.0 +ARG MC_HELPER_VERSION=1.11.0 ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION} RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \ | tar -C /usr/share -zxf - \ diff --git a/scripts/start-deployFabric b/scripts/start-deployFabric index 228bdeaeaef..770b03fba97 100755 --- a/scripts/start-deployFabric +++ b/scripts/start-deployFabric @@ -2,27 +2,31 @@ set -eu # shellcheck source=start-utils -. ${SCRIPTS:-/}start-utils +. "${SCRIPTS:-/}start-utils" requireVar VANILLA_VERSION export TYPE=FABRIC -export SERVER=fabric-server-${VANILLA_VERSION}.jar +: "${FABRIC_INSTALLER_VERSION:=${FABRICVERSION:-LATEST}}" +: "${FABRIC_INSTALLER:=}" +: "${FABRIC_INSTALLER_URL:=}" +: "${FABRIC_LOADER_VERSION:=LATEST}" isDebugging && set -x -if [[ ! -e ${SERVER} ]]; then +log "Checking Fabric version information." +if [[ $FABRIC_INSTALLER ]]; then + FABRIC_INSTALLER_VERSION=$(echo -n "$FABRIC_INSTALLER" | mc-image-helper hash) +elif [[ $FABRIC_INSTALLER_URL ]]; then + FABRIC_INSTALLER_VERSION=$(echo -n "$FABRIC_INSTALLER_URL" | mc-image-helper hash) +elif [[ ${FABRIC_INSTALLER_VERSION^^} = LATEST ]]; then + FABRIC_INSTALLER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml) +fi - : ${FABRIC_INSTALLER:=} - : ${FABRIC_INSTALLER_URL:=} - : ${FABRIC_LOADER_VERSION:=LATEST} - : ${FABRIC_INSTALLER_VERSION:=${FABRICVERSION:-LATEST}} +export SERVER=fabric-server-${VANILLA_VERSION}-${FABRIC_INSTALLER_VERSION}.jar - if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then - log "Checking Fabric version information." - if [[ ${FABRIC_INSTALLER_VERSION^^} = LATEST ]]; then - FABRIC_INSTALLER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml) - fi +if [[ ! -e ${SERVER} ]]; then + if [[ -z $FABRIC_INSTALLER && -z $FABRIC_INSTALLER_URL ]]; then FABRIC_INSTALLER="fabric-installer-${FABRIC_INSTALLER_VERSION}.jar" FABRIC_INSTALLER_URL="https://maven.fabricmc.net/net/fabricmc/fabric-installer/${FABRIC_INSTALLER_VERSION}/fabric-installer-${FABRIC_INSTALLER_VERSION}.jar" elif [[ -z $FABRIC_INSTALLER ]]; then @@ -70,4 +74,4 @@ if [[ ! -e ${SERVER} ]]; then fi export FAMILY=FABRIC -exec ${SCRIPTS:-/}start-setupWorld "$@" +exec "${SCRIPTS:-/}start-setupWorld" "$@"