From d8ad2e572174155dae9c6f8a76b3853535d2cc53 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 9 Sep 2023 08:37:46 -0500 Subject: [PATCH] modrinth: provide dependencies download options (#2375) --- Dockerfile | 2 +- docs/misc/contributing/development.md | 2 ++ docs/mods-and-plugins/modrinth.md | 4 ++-- scripts/start-setupModpack | 8 ++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 23db69d4d11..db8abf4f2dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --var version=1.9.0 --var app=mc-server-runner --file {{.app}} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz -ARG MC_HELPER_VERSION=1.35.1 +ARG MC_HELPER_VERSION=1.35.2 ARG MC_HELPER_BASE_URL=https://github.com/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/misc/contributing/development.md b/docs/misc/contributing/development.md index c043df207d4..947aace78b1 100644 --- a/docs/misc/contributing/development.md +++ b/docs/misc/contributing/development.md @@ -83,6 +83,8 @@ cd build/distributions jwebserver -b 0.0.0.0 -p 8008 ``` +If `jwebserver` is not available, try `java -m jdk.httpserver` + ```shell --build-arg MC_HELPER_VERSION=1.8.1-SNAPSHOT \ --build-arg MC_HELPER_BASE_URL=http://host.docker.internal:8008 diff --git a/docs/mods-and-plugins/modrinth.md b/docs/mods-and-plugins/modrinth.md index a16427d1ca1..cc0652dacb6 100644 --- a/docs/mods-and-plugins/modrinth.md +++ b/docs/mods-and-plugins/modrinth.md @@ -22,8 +22,8 @@ ## Extra options -`MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES` -: Required dependencies of the project will _always_ be downloaded and optional dependencies can also be downloaded by setting this to `true`. The default is "true" +`MODRINTH_DOWNLOAD_DEPENDENCIES` +: Can be set to `none` (the default), `required`, or `optional` to download required and/or optional dependencies. `MODRINTH_ALLOWED_VERSION_TYPE` : The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. diff --git a/scripts/start-setupModpack b/scripts/start-setupModpack index 3a77db377cc..ca186140853 100755 --- a/scripts/start-setupModpack +++ b/scripts/start-setupModpack @@ -229,8 +229,12 @@ function handleGenericPacks() { function handleModrinthProjects() { : "${MODRINTH_PROJECTS:=}" - : "${MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES:=true}" : "${MODRINTH_ALLOWED_VERSION_TYPE:=release}" + : "${MODRINTH_DOWNLOAD_DEPENDENCIES:=none}" + if [[ -v MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES ]]; then + log "WARNING The variable MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES is removed." + log " Use MODRINTH_DOWNLOAD_DEPENDENCIES=optional instead" + fi if [[ $MODRINTH_PROJECTS ]] && isFamily HYBRID FORGE FABRIC SPIGOT; then if isFamily HYBRID FORGE; then @@ -246,7 +250,7 @@ function handleModrinthProjects() { --projects="${MODRINTH_PROJECTS}" \ --game-version="${VERSION}" \ --loader="$loader" \ - --download-optional-dependencies="$MODRINTH_DOWNLOAD_OPTIONAL_DEPENDENCIES" \ + --download-dependencies="$MODRINTH_DOWNLOAD_DEPENDENCIES" \ --allowed-version-type="$MODRINTH_ALLOWED_VERSION_TYPE" fi }