10 Commits
Author SHA1 Message Date
fithwum 2c8a9fc1d6 Update changelogs on 2026-07-29T22:44:31Z [skip ci] 2026-07-29 22:44:31 +00:00
fithwum 988a076d1f add auto update for vanilla
minecraft-build-testing / Docker prune (vm-docker-build2) (push) Successful in 5s
minecraft-build-testing / Build and Push testing (push) Successful in 43s
minecraft-build-testing / generate-changelogs (push) Successful in 8s
minecraft-build-testing / generate-build-info (push) Successful in 21s
2026-07-29 15:43:24 -07:00
fithwum ce2529827b Merge build-info updates 2026-07-29 01:49:45 +00:00
fithwum c89d923e08 Update build-info on 2026-07-29T01:49:44Z [skip ci] 2026-07-29 01:49:44 +00:00
fithwum 16b57f5296 Merge build-info updates 2026-07-29 01:49:33 +00:00
fithwum 9a3661c4cf Update build-info on 2026-07-29T01:49:32Z [skip ci] 2026-07-29 01:49:32 +00:00
fithwum fd735bc759 Merge changelog updates 2026-07-29 01:49:21 +00:00
fithwum b2a67d633f Update changelogs on 2026-07-29T01:49:20Z [skip ci] 2026-07-29 01:49:20 +00:00
fithwum 53b683f52c Merge changelog updates 2026-07-29 01:49:11 +00:00
fithwum 2bad945ee1 Update changelogs on 2026-07-29T01:49:10Z [skip ci] 2026-07-29 01:49:10 +00:00
5 changed files with 90 additions and 71 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
## 2026-07-29T01:46:47Z
## 2026-07-29T01:49:10Z
- Merge changelog updates (fithwum)
- Update changelogs on 2026-07-29T01:46:45Z [skip ci] (fithwum)
- update (fithwum)
- update to workflows (fithwum)
- update dockerfile (fithwum)
- Merge build-info updates (fithwum)
- Update build-info on 2026-07-29T01:47:03Z [skip ci] (fithwum)
- Merge build-info updates (fithwum)
+3 -3
View File
@@ -1,9 +1,9 @@
{
"version": "minecraft",
"commit": "0591ad24de407d022187ac7cd7d7d5bca6ce60ae",
"build_time": "2026-07-29T01:47:03Z",
"commit": "fd735bc759c4d93349057c023f8093f627fbca42",
"build_time": "2026-07-29T01:49:32Z",
"image_tag": "gitea.fithwum.tech/fithwum/minecraft:minecraft",
"digest": "gitea.fithwum.tech/fithwum/minecraft@sha256:8cde0661cf5d166f7e323d516febdf256fda3ec1df33499388e3b8b0ee74b39e",
"digest": "gitea.fithwum.tech/fithwum/minecraft@sha256:2d4529b629f59b04533aed265bb49dba2f9d16ae02a121d7db511076c8f1a865",
"image_size": "302MB",
"image_size_bytes": 317419226
}
+4 -4
View File
@@ -1,5 +1,5 @@
## 2026-07-29T01:46:45Z
## 2026-07-29T22:44:31Z
- update (fithwum)
- update to workflows (fithwum)
- update (fithwum)
- add auto update for vanilla (fithwum)
- Merge build-info updates (fithwum)
- Update build-info on 2026-07-29T01:49:44Z [skip ci] (fithwum)
+4 -4
View File
@@ -1,9 +1,9 @@
{
"version": "testing",
"commit": "0591ad24de407d022187ac7cd7d7d5bca6ce60ae",
"build_time": "2026-07-29T01:47:00Z",
"commit": "16b57f5296b06052a7aa5b2800211198e7bbd97e",
"build_time": "2026-07-29T01:49:43Z",
"image_tag": "gitea.fithwum.tech/fithwum/minecraft:testing",
"digest": "gitea.fithwum.tech/fithwum/minecraft@sha256:f3ddd27bb9275599ab1198a2a187ebd7dea473173a96334a740252c7aa3b66a2",
"digest": "gitea.fithwum.tech/fithwum/minecraft@sha256:9b50b5733d7162cd2920ad27dd0fad5b2516d19074aa418097d8dd20328cd68f",
"image_size": "304MB",
"image_size_bytes": 318999352
"image_size_bytes": 318984743
}
+74 -55
View File
@@ -4,26 +4,20 @@
DEBIAN_VERSION=13
MC_DIR_OLD=/mc_server
MC_DIR=/mcserver
if [ -d "$MC_DIR_OLD" ]; then
mkdir -p "$MC_DIR"
mv $MC_DIR_OLD/* "$MC_DIR/" 2>/dev/null || true
fi
EULA_FILE=$MC_DIR/eula.txt
EULA_MARKER=$MC_DIR/.eula_accepted
INSTALLED_VERSION=$MC_DIR/installed-$TARGET_VERSION
SERVER_PROPERTIES=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/server.properties
START_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/start.sh
RUN_VANILLA=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/run-vanilla.sh
RUN_BUKKIT=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/run-bukkit.sh
RUN_FABRIC=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/run-fabric.sh
RUN_QUILT=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/run-quilt.sh
VERSION_CHECK=$(curl -s "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json" | grep -Pom 1 '"url": "\K[^"]*'$MC_VERSION'.json')
MC_SERVER_FILE=$(curl -s $VERSION_CHECK | jq --raw-output '.downloads.server.url')
BUKKIT_INSTALLER_FILE=https://cdn.getbukkit.org/craftbukkit/craftbukkit-$MC_VERSION.jar
FABRIC_SERVER_FILE=https://meta.fabricmc.net/v2/versions/loader/$MC_VERSION/$FABRIC_VERSION/$FABRIC_INSTALLER_VERSION/server/jar
QUILT_INSTALLER_FILE=https://quiltmc.org/api/v1/download-latest-installer/java-universal
@@ -53,32 +47,6 @@ elif [ $JAVA_VERSION = "openjdk-25-jre" ]; then
apt-get update
apt-get --no-install-recommends -y install openjdk-25-jre-headless
fi
# elif [ $JAVA_VERSION = "msopenjdk-21" ]; then
# echo "INFO ! $JAVA_VERSION Selected"
# if [ dpkg -s msopenjdk-21 &> /dev/null ]
# then
# echo "INFO ! $JAVA_VERSION installed ... moving on."
# else
# echo " "
# echo "WARNING ! $JAVA_VERSION not installed ... will install now."
# wget https://packages.microsoft.com/config/debian/$DEBIAN_VERSION/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
# dpkg -i packages-microsoft-prod.deb
# apt-get update && apt-get install -y msopenjdk-21
# apt-get -y update && apt-get -y --fix-broken install
# fi
# elif [ $JAVA_VERSION = "msopenjdk-25" ]; then
# echo "INFO ! $JAVA_VERSION Selected"
# if [ dpkg -s msopenjdk-25 &> /dev/null ]
# then
# echo "INFO ! $JAVA_VERSION installed ... moving on."
# else
# echo " "
# echo "WARNING ! $JAVA_VERSION not installed ... will install now."
# wget https://packages.microsoft.com/config/debian/$DEBIAN_VERSION/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
# dpkg -i packages-microsoft-prod.deb
# apt-get update && apt-get install -y msopenjdk-25
# apt-get -y update && apt-get -y --fix-broken install
# fi
else
echo "ERROR ! Java version must be set first run"
sleep infinity
@@ -88,27 +56,78 @@ fi
# Check for server files and download if needed.
if [ $MC_TYPE = "vanilla" ]; then
echo "INFO ! Vanilla Selected"
if [ -e $MC_DIR/mcserver-$MC_VERSION.jar ]
then
echo " "
echo "INFO ! mcserver-$MC_VERSION.jar found starting now."
else
echo " "
echo "WARNING ! mcserver-$MC_VERSION.jar is out of date/missing ... will download now."
echo " "
echo "INFO ! Cleaning old files."
cd $MC_DIR
mkdir -pv old-server-versions/
rm -fr *.jar libraries defaultconfigs config mods user_jvm_args.txt run.bat
mv -v *.log old-server-versions/
wget --no-cache --show-progress --progress=bar:force:noscroll $MC_SERVER_FILE -O mcserver-$MC_VERSION.jar
chmod +x mcserver-$MC_VERSION.jar
echo " "
echo "WARNING ! run-$MC_TYPE-$MC_VERSION.sh is out of date/missing ... will generate now."
mv -v run-*.sh old-server-versions/
wget --no-cache --show-progress --progress=bar:force:noscroll $RUN_VANILLA -O run-$MC_TYPE-$MC_VERSION.sh
chmod +x run-$MC_TYPE-$MC_VERSION.sh
cd ..
# Fallback to default channel type if MC_TYPE or MC_VERSION is empty
: "${MC_VERSION:=latest}"
echo "Using server type: $MC_TYPE"
# Get the currently installed Minecraft version from the filesystem
CUR_VERSION=$(find "$MC_DIR" -name "installed-*" | cut -d - -f2-)
echo "Current local version: '${CUR_VERSION:-None}'"
# Fetch the global Minecraft version manifest cleanly
JSON=$(curl -s "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json")
# Validate that we actually received valid JSON
if [ -z "$JSON" ] || ! echo "$JSON" | jq . >/dev/null 2>&1; then
echo "Error: Failed to fetch valid JSON from Mojang API"
exit 1
fi
# Resolve the target version dynamically
if [ ! -z "$MC_VERSION" ] && [ "$MC_VERSION" != "latest" ]; then
# User specified an exact version string (e.g., 1.20.1)
TARGET_VERSION=$(echo "$JSON" | jq -r --arg version "$MC_VERSION" '.versions[] | select(.id == $version) | .id')
if [ -z "$TARGET_VERSION" ]; then
echo "Error: Specified version '$MC_VERSION' not found in Mojang API."
exit 1
fi
else
# No version specified or "latest" chosen. Pull from the latest release
TARGET_VERSION=$(echo "$JSON" | jq -r '.latest.release')
fi
echo "Target version determined: '$TARGET_VERSION'"
# Update variable to match resolved target
MC_VERSION=$TARGET_VERSION
# Compare versions and only update if they do NOT match
if [ "$CUR_VERSION" != "$TARGET_VERSION" ]; then
echo "Versions differ ($CUR_VERSION vs $TARGET_VERSION). Fetching Minecraft server download URL..."
# Extract the target sub-manifest URL for this specific Minecraft version
VERSION_CHECK=$(echo "$JSON" | jq -r --arg version "$TARGET_VERSION" '.versions[] | select(.id == $version) | .url')
if [ "$VERSION_CHECK" == "null" ] || [ -z "$VERSION_CHECK" ]; then
echo "Error: Metadata URL link not found for version $TARGET_VERSION"
exit 1
fi
# Fetch the specific version's metadata JSON and extract the server jar link
MC_SERVER_FILE=$(curl -s "$VERSION_CHECK" | jq -r '.downloads.server.url')
if [ "$MC_SERVER_FILE" == "null" ] || [ -z "$MC_SERVER_FILE" ]; then
echo "Error: Server jar download URL not found for version $TARGET_VERSION"
exit 1
fi
echo "Ready to download: $MC_SERVER_FILE"
# Process Vanilla Minecraft downloads
echo " "
echo "WARNING ! Minecraft server is out of date/missing ... will download now."
echo "INFO ! Cleaning old files."
cd "$MC_DIR" || exit 1
mkdir -pv old-server-versions/
# Wipe old dependencies cleanly
rm -fr *.jar libraries defaultconfigs user_jvm_args.txt run.bat
# Safely preserve old logs
[ -f *.log ] && mv *.log old-server-versions/
# Download and fix execution modes
wget --no-cache --show-progress --progress=bar:force:noscroll "$MC_SERVER_FILE" -O "mcserver-$MC_VERSION.jar"
chmod +x "mcserver-$MC_VERSION.jar"
echo " "
echo "WARNING ! run-$MC_TYPE-$MC_VERSION.sh is out of date/missing ... will download now."
[ -f run-*.sh ] && mv -v run-*.sh old-server-versions/
wget --no-cache --show-progress --progress=bar:force:noscroll "$RUN_VANILLA" -O "run-$MC_TYPE-$MC_VERSION.sh"
chmod +x "run-$MC_TYPE-$MC_VERSION.sh"
# Drop updated marker file
rm -f installed-*
touch installed-$MC_VERSION
cd ..
else
echo "No update required. Local version matches target version."
fi
elif [ $MC_TYPE = "bukkit" ]; then
echo "INFO ! Bukkit Selected"