mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Add VERSION_FROM_MODRINTH_PROJECTS (#3580)
This commit is contained in:
@@ -139,6 +139,15 @@ cd /data || exit 1
|
||||
export DECLARED_TYPE=${TYPE^^}
|
||||
export DECLARED_VERSION="$VERSION"
|
||||
|
||||
if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]]; then
|
||||
if ! VERSION=$(mc-image-helper version-from-modrinth-projects --projects "${MODRINTH_PROJECTS}"); then
|
||||
logError "failed to resolve version from MODRINTH_PROJECTS: ${MODRINTH_PROJECTS}"
|
||||
exit 1
|
||||
fi
|
||||
log "Resolved Minecraft version $VERSION from Modrinth projects"
|
||||
export VERSION
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||
"${SCRIPTS:-/}start-autopause"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user