mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Handle various versions of Magma Maintained (#2563)
This commit is contained in:
parent
7fa522853f
commit
cbd1e8d86d
@ -9,18 +9,23 @@ isDebugging && set -x
|
||||
|
||||
resolveVersion
|
||||
|
||||
if [ -z $VERSION ]; then
|
||||
log "ERROR the variable VERSION is not specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $MAGMA_MAINTAINED_TAG ]; then
|
||||
log "ERROR the variable MAGMA_MAINTAINED_TAG is not specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# https://github.com/magmamaintained/Magma-1.12.2/releases/download/88659fb/Magma-1.12.2-88659fb-server.jar
|
||||
downloadUrl="https://github.com/magmamaintained/Magma-${VERSION}/releases/download/${MAGMA_MAINTAINED_TAG}/magma-${VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
|
||||
# Magma-1.12.2/releases/download/88659fb/Magma-1.12.2-88659fb-server.jar
|
||||
# Magma-1.20.1/releases/download/adec9ce/magma-1.20.1-47.2.17-adec9ce-server.jar
|
||||
if [[ ${VERSION} = "1.12.2" ]]; then
|
||||
fileName="Magma-${VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
|
||||
else
|
||||
if [ -z $FORGE_VERSION ]; then
|
||||
log "ERROR the variable FORGE_VERSION is not specified"
|
||||
exit 1
|
||||
fi
|
||||
fileName="magma-${VERSION}-${FORGE_VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
|
||||
fi
|
||||
downloadUrl="https://github.com/magmamaintained/Magma-${VERSION}/releases/download/${MAGMA_MAINTAINED_TAG}/${fileName}"
|
||||
|
||||
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Magma Maintained server jar from $downloadUrl"
|
||||
|
Loading…
Reference in New Issue
Block a user