From 629156e1b3293cc3d5fe6259acce16a442586699 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 4 Feb 2024 18:57:04 -0600 Subject: [PATCH] auto-cf: provide option to force reinstall modpack's modloader (#2633) --- Dockerfile | 2 +- docs/types-and-platforms/mod-platforms/auto-curseforge.md | 1 + scripts/start-deployAutoCF | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa5915b9..2ae3e561 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \ --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz -ARG MC_HELPER_VERSION=1.37.9 +ARG MC_HELPER_VERSION=1.37.10 ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} # used for cache busting local copy of mc-image-helper ARG MC_HELPER_REV=1 diff --git a/docs/types-and-platforms/mod-platforms/auto-curseforge.md b/docs/types-and-platforms/mod-platforms/auto-curseforge.md index 4eb78a64..b9501aa1 100644 --- a/docs/types-and-platforms/mod-platforms/auto-curseforge.md +++ b/docs/types-and-platforms/mod-platforms/auto-curseforge.md @@ -215,3 +215,4 @@ Some modpacks come with world/save data via a worlds file and/or the overrides p Other configuration available: - `CF_PARALLEL_DOWNLOADS` (default is 4): specify how many parallel mod downloads to perform - `CF_OVERRIDES_SKIP_EXISTING` (default is false): if set, files in the overrides that already exist in the data directory are skipped. **NOTE** world data is always skipped, if present. +- `CF_FORCE_REINSTALL_MODLOADER` (default is false): this can be set to `true` to force the modpack's declared modloader, such as Forge, to be reinstalled. This is useful if some of the modloader's files become corrupted. diff --git a/scripts/start-deployAutoCF b/scripts/start-deployAutoCF index c59cb667..af88b696 100644 --- a/scripts/start-deployAutoCF +++ b/scripts/start-deployAutoCF @@ -10,6 +10,7 @@ set -eu : "${CF_FILENAME_MATCHER:=}" : "${CF_PARALLEL_DOWNLOADS:=4}" : "${CF_FORCE_SYNCHRONIZE:=false}" +: "${CF_FORCE_REINSTALL_MODLOADER:=false}" : "${CF_EXCLUDE_INCLUDE_FILE=https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json}" : "${CF_EXCLUDE_MODS:=}" : "${CF_FORCE_INCLUDE_MODS:=}" @@ -49,6 +50,7 @@ if [[ ${CF_OVERRIDES_EXCLUSIONS} ]]; then fi args+=( --force-synchronize="$CF_FORCE_SYNCHRONIZE" + --force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER" --overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING" )