From c635a7dcdb6630db7871bd0884be656245331201 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 30 Apr 2023 21:25:07 -0500 Subject: [PATCH] autocf: allow manifest JSON to be provided (#2111) --- Dockerfile | 2 +- README.md | 2 +- scripts/start-deployAutoCF | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a00b0292..25a34014 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz -ARG MC_HELPER_VERSION=1.27.8 +ARG MC_HELPER_VERSION=1.27.9 ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \ | tar -C /usr/share -zxf - \ diff --git a/README.md b/README.md index e0a47269..5ef55813 100644 --- a/README.md +++ b/README.md @@ -681,7 +681,7 @@ For example: For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string. -If the authors of the modpack have disallowed project distribution, then the desired **client** modpack zip will need to be manually downloaded and made available to the container. The path to that file must be passed to `CF_MODPACK_ZIP`. +If the authors of the modpack have disallowed project distribution, then the desired **client** modpack zip will need to be manually downloaded and made available to the container. The path to that file must be passed to `CF_MODPACK_ZIP`. Similarly, the container path to a modpack manifest JSON can be passed to `CF_MODPACK_MANIFEST`. In either case, the modpack slug or page URL must still be provided. The latest file will be located and used by default, but if a specific version is desired you can use one of the following options. With any of these options **do not select a server file** -- they lack the required manifest and defeat the ability to consistently automate startup. diff --git a/scripts/start-deployAutoCF b/scripts/start-deployAutoCF index 0e5fe719..00af1562 100644 --- a/scripts/start-deployAutoCF +++ b/scripts/start-deployAutoCF @@ -16,6 +16,7 @@ set -eu : "${CF_SET_LEVEL_FROM:=}" # --set-level-from : "${CF_OVERRIDES_SKIP_EXISTING:=false}" # --overrides-skip-existing : "${CF_DOWNLOADS_REPO=$([ -d /downloads ] && echo '/downloads' || echo '')}" +: "${CF_MODPACK_MANIFEST:=}" resultsFile=/data/.install-curseforge.env @@ -33,6 +34,9 @@ fi if [[ $CF_SLUG ]]; then args+=(--slug="$CF_SLUG") fi +if [[ $CF_MODPACK_MANIFEST ]]; then + args+=(--modpack-manifest="$CF_MODPACK_MANIFEST") +fi if [[ $CF_FILENAME_MATCHER ]]; then args+=(--filename-matcher="$CF_FILENAME_MATCHER") fi