neoforge: handle new version ordering (#3703)

This commit is contained in:
Geoff Bourne
2025-10-09 18:54:56 -05:00
committed by GitHub
parent 18f69b7680
commit f88cb8eee9
5 changed files with 57 additions and 25 deletions

View File

@@ -3,10 +3,8 @@
set -e -o pipefail
: "${REMOVE_OLD_MODS:=false}"
: "${MODS:=}"
: "${MODS_OUT_DIR:=/data/mods}"
: "${MODS_FILE:=}"
: "${PLUGINS:=}"
: "${PLUGINS_OUT_DIR:=/data/plugins}"
: "${PLUGINS_FILE:=}"
: "${REMOVE_OLD_MODS_DEPTH:=1} "
@@ -94,7 +92,7 @@ fi
function handleListings() {
if usesMods && usesPlugins; then
if [[ "$MODS" ]]; then
if [[ -v MODS ]]; then
ensureRemoveAllModsOff "MODS is set"
@@ -105,7 +103,7 @@ function handleListings() {
--to="$MODS_OUT_DIR" \
"$MODS"
fi
if [[ "$PLUGINS" ]]; then
if [[ -v PLUGINS ]]; then
ensureRemoveAllModsOff "PLUGINS is set"
mkdir -p "$PLUGINS_OUT_DIR"
mc-image-helper mcopy \
@@ -140,14 +138,14 @@ function handleListings() {
outDir="$PLUGINS_OUT_DIR"
fi
if [[ "$MODS" || "$PLUGINS" ]]; then
if [[ -v MODS || -v PLUGINS ]]; then
ensureRemoveAllModsOff "MODS or PLUGINS is set"
mkdir -p "$outDir"
mc-image-helper mcopy \
--glob=*.jar \
--scope=var-list \
--to="$outDir" \
"$MODS" "$PLUGINS"
"${MODS:-}" "${PLUGINS:-}"
fi
if [[ "$MODS_FILE" || "$PLUGINS_FILE" ]]; then