6e13a0aa15
Build dev image / build (push) Failing after 18m12s
- Split monolithic init into modular lib files under scripts/lib/
(common.sh, java.sh, server.sh, loaders/{vanilla,paper,fabric,forge,neoforge}.sh)
- Add bedrock loader: downloads from Minecraft Services API,
runs native binary with LD_LIBRARY_PATH, skips Java setup
- Add auto-detection for JAVA_VERSION from Mojang version manifest
(MC 1.20.5+ -> temurin@21, 1.17-1.20.4 -> temurin@17,
1.17 -> temurin@16, pre-1.17 -> temurin@8)
- Fix NEW_FORGE unbound variable when non-Forge loaders run
- Fix Fabric loader jq filter (-s slurp removed, null string check fixed)
- Fix Forge test detection (recursive find for forge-*-server.jar)
- Dynamic healthcheck: nc -z TCP 25565 for Java, nc -zu UDP 19132 for bedrock
- Add .gitea/workflows/build-dev.yml for dev branch CI builds
- Base image: debian:bookworm-slim (from ubuntu:noble)
- Add unzip, netcat-openbsd to Docker image
- Switch to shebangs, set -euo pipefail throughout
23 lines
787 B
Bash
23 lines
787 B
Bash
getFabric() {
|
|
SERVER_TYPE="Fabric Minecraft"
|
|
LATEST_BUILD=$(curl -s https://meta.fabricmc.net/v2/versions/loader/${MC_VERSION} | jq -r '.[0].loader.version')
|
|
LATEST_INSTALLER=$(curl -s https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml | xmllint --xpath "/metadata/versioning/latest/text()" -)
|
|
|
|
if [[ -z "$MC_VERSION" ]]; then
|
|
echo "Minecraft version not set"
|
|
exit 1
|
|
fi
|
|
VER=$MC_VERSION
|
|
|
|
VER_LOADER="${FABRIC_LOADER_VERSION:-${LATEST_BUILD}}"
|
|
DL_URL=https://meta.fabricmc.net/v2/versions/loader/${MC_VERSION}/${VER_LOADER}/${LATEST_INSTALLER}/server/jar
|
|
|
|
if [ "$LATEST_BUILD" != "null" ]; then
|
|
echo "$DL_URL"
|
|
curl -o server.jar "${DL_URL}"
|
|
else
|
|
echo "No valid Fabric build found for version ${MC_VERSION}"
|
|
crash
|
|
fi
|
|
}
|