mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-04 17:39:37 +00:00
parent
eccc989887
commit
4b28d5e472
2 changed files with 18 additions and 14 deletions
|
@ -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 - \
|
||||
|
|
|
@ -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
|
||||
|
||||
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
|
||||
|
||||
export SERVER=fabric-server-${VANILLA_VERSION}-${FABRIC_INSTALLER_VERSION}.jar
|
||||
|
||||
if [[ ! -e ${SERVER} ]]; then
|
||||
|
||||
: ${FABRIC_INSTALLER:=}
|
||||
: ${FABRIC_INSTALLER_URL:=}
|
||||
: ${FABRIC_LOADER_VERSION:=LATEST}
|
||||
: ${FABRIC_INSTALLER_VERSION:=${FABRICVERSION:-LATEST}}
|
||||
|
||||
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
|
||||
|
||||
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" "$@"
|
||||
|
|
Loading…
Reference in a new issue