Skip to content

Commit 14de928

Browse files
authored
auto-cf: add option to ignore files missing from previous installation (#2649)
1 parent 6aaed2d commit 14de928

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
4949
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
5050
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
5151

52-
ARG MC_HELPER_VERSION=1.37.12
52+
ARG MC_HELPER_VERSION=1.37.13
5353
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
5454
# used for cache busting local copy of mc-image-helper
5555
ARG MC_HELPER_REV=1

docs/types-and-platforms/mod-platforms/auto-curseforge.md

+24
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,36 @@ Ant-style paths can include the following globbing/wildcard symbols:
207207
## World/Level Data
208208

209209
Some modpacks come with world/save data via a worlds file and/or the overrides provided with the modpack. Either approach can be selected to set the `LEVEL` to the resulting saves directory by setting `CF_SET_LEVEL_FROM` to either:
210+
210211
- `WORLD_FILE`
211212
- `OVERRIDES`
212213

214+
## Ignore missing files
215+
216+
Some mods use temporary files from the modpack and delete them when finished. Others will patch themselves and "disable" the original mod jar, such as gregtech. In order to avoid the installer from detecting the absent file(s) and re-installing, those files can be ignored by passing a comma or newline delimited list to `CF_IGNORE_MISSING_FILES`.
217+
218+
!!! hint
219+
220+
A warning log will indicate what files were found to be missing from the previous installation run, such as
221+
222+
```
223+
Re-installing due to missing files from modpack: [mods/gregtech-2.6.2-beta.jar]
224+
```
225+
226+
!!! example
227+
228+
In a Compose file
229+
```yaml
230+
environment:
231+
CF_IGNORE_MISSING_FILES: |
232+
mods/gregtech-2.6.2-beta.jar
233+
```
234+
235+
213236
## Extra options
214237
215238
Other configuration available:
239+
216240
- `CF_PARALLEL_DOWNLOADS` (default is 4): specify how many parallel mod downloads to perform
217241
- `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.
218242
- `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.

scripts/start-deployAutoCF

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set -eu
1111
: "${CF_PARALLEL_DOWNLOADS:=4}"
1212
: "${CF_FORCE_SYNCHRONIZE:=false}"
1313
: "${CF_FORCE_REINSTALL_MODLOADER:=false}"
14+
: "${CF_IGNORE_MISSING_FILES:=}"
1415
: "${CF_EXCLUDE_INCLUDE_FILE=https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json}"
1516
: "${CF_EXCLUDE_MODS:=}"
1617
: "${CF_FORCE_INCLUDE_MODS:=}"
@@ -50,6 +51,9 @@ fi
5051
if [[ ${CF_OVERRIDES_EXCLUSIONS} ]]; then
5152
args+=(--overrides-exclusions="$CF_OVERRIDES_EXCLUSIONS")
5253
fi
54+
if [[ ${CF_IGNORE_MISSING_FILES} ]]; then
55+
args+=(--ignore-missing-files="$CF_IGNORE_MISSING_FILES")
56+
fi
5357
args+=(
5458
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
5559
--force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER"

0 commit comments

Comments
 (0)