From e69ee85f8efc078325d29b5e5a41f4d1e013e888 Mon Sep 17 00:00:00 2001 From: Tristan <44125476+IronMine@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:12:13 +0200 Subject: [PATCH] #3115 rename MOD_PLATFORM to MODPACK_PLATFORM (#3120) --- docs/mods-and-plugins/index.md | 6 +++--- docs/types-and-platforms/index.md | 4 ++-- .../mod-platforms/auto-curseforge.md | 4 ++-- .../mod-platforms/curseforge.md | 2 +- docs/types-and-platforms/mod-platforms/ftb.md | 2 +- .../mod-platforms/modrinth-modpacks.md | 2 +- examples/aof7/docker-compose.yml | 2 +- examples/atm8/docker-compose.yml | 2 +- examples/atm9/docker-compose.yml | 2 +- .../auto-cf/modpack-manifest/docker-compose.yml | 2 +- .../auto-cf/using-excludes/docker-compose.yml | 2 +- examples/bettermc/docker-compose.yml | 2 +- examples/bmc4/docker-compose.yml | 2 +- examples/modrinth-modpack/docker-compose.yml | 2 +- .../modrinth/local-modpack/docker-compose.yml | 2 +- examples/one-block-modded/docker-compose.yml | 2 +- examples/pixelmon/docker-compose.yml | 2 +- examples/prominence2/docker-compose.yml | 2 +- examples/rad2/compose.yaml | 2 +- examples/rlcraft/docker-compose.yml | 2 +- examples/valhesia5/docker-compose.yml | 2 +- examples/vault-hunters-1-18-2/docker-compose.yml | 2 +- scripts/start-configuration | 15 ++++++++++----- scripts/start-deployAutoCF | 2 +- scripts/start-deployModrinth | 4 ++-- scripts/start-setupModpack | 2 +- .../auto_curseforge/docker-compose.yml | 2 +- 27 files changed, 41 insertions(+), 36 deletions(-) diff --git a/docs/mods-and-plugins/index.md b/docs/mods-and-plugins/index.md index 89ffa6ce..058778fa 100644 --- a/docs/mods-and-plugins/index.md +++ b/docs/mods-and-plugins/index.md @@ -1,10 +1,10 @@ # Working with mods and plugins -## Mod platforms +## Modpack platforms -By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported mod platforms](../types-and-platforms/index.md). +By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported modpack platforms](../types-and-platforms/index.md). -The following are some supported mod platforms: +The following are some supported modpack platforms: - [Modrinth](../types-and-platforms/mod-platforms/modrinth-modpacks.md) - [CurseForge](../types-and-platforms/mod-platforms/auto-curseforge.md) diff --git a/docs/types-and-platforms/index.md b/docs/types-and-platforms/index.md index 161a1851..49d77fed 100644 --- a/docs/types-and-platforms/index.md +++ b/docs/types-and-platforms/index.md @@ -1,4 +1,4 @@ -# Server Types and Mod Platforms +# Server Types and Modpack Platforms Server types can be selected by setting the `TYPE` environment variable to one of the types described in these sections. @@ -6,7 +6,7 @@ The default server type is [the official software provided by Mojang](https://ww **From the sections to the left...** -The **mod platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The mod platforms are selected by setting `MOD_PLATFORM`; however, for ease of use and compatibility, the selection can be set in `TYPE`. +The **modpack platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The modpack platforms are selected by setting `MODPACK_PLATFORM`; however, for ease of use and backward compatibility, the selection can be set in `TYPE` or `MOD_PLATFORM`. The individual **server types** allow for selecting the mod loader / server type and specific versions of those. diff --git a/docs/types-and-platforms/mod-platforms/auto-curseforge.md b/docs/types-and-platforms/mod-platforms/auto-curseforge.md index 094d0763..84edda7e 100644 --- a/docs/types-and-platforms/mod-platforms/auto-curseforge.md +++ b/docs/types-and-platforms/mod-platforms/auto-curseforge.md @@ -1,6 +1,6 @@ # Auto CurseForge -To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed. +To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed. ## API Key @@ -116,7 +116,7 @@ If you wish to use an unpublished modpack zip, set the container path to the fil image: itzg/minecraft-server environment: EULA: true - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # allocate from https://console.curseforge.com/ and set in .env file CF_API_KEY: ${CF_API_KEY} CF_MODPACK_MANIFEST: /manifests/manifest.json diff --git a/docs/types-and-platforms/mod-platforms/curseforge.md b/docs/types-and-platforms/mod-platforms/curseforge.md index 8fb4e692..87e56270 100644 --- a/docs/types-and-platforms/mod-platforms/curseforge.md +++ b/docs/types-and-platforms/mod-platforms/curseforge.md @@ -4,7 +4,7 @@ This mod platform type is deprecated. Please use [AUTO_CURSEFORGE](auto-curseforge.md) for new deployments. -Enable this server mode by setting `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables. +Enable this server mode by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables. You need to specify a modpack to run, using the `CF_SERVER_MOD` environment variable. A CurseForge server modpack is available together with its respective diff --git a/docs/types-and-platforms/mod-platforms/ftb.md b/docs/types-and-platforms/mod-platforms/ftb.md index 31368df6..926e3146 100644 --- a/docs/types-and-platforms/mod-platforms/ftb.md +++ b/docs/types-and-platforms/mod-platforms/ftb.md @@ -3,7 +3,7 @@ !!! note Requires one of the Ubuntu with Hotspot images listed in [the Java versions section](../../versions/java.md). -[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MOD_PLATFORM` or `TYPE` to "FTBA" +[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "FTBA" !!! note The "A" at the end of "FTBA" is important. The value "FTB" used to be an alias for "CURSEFORGE". diff --git a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md index f7dee833..160a6528 100644 --- a/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md +++ b/docs/types-and-platforms/mod-platforms/modrinth-modpacks.md @@ -1,6 +1,6 @@ # Modrinth Modpacks -[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader. +[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader. ## Modpack project diff --git a/examples/aof7/docker-compose.yml b/examples/aof7/docker-compose.yml index 4e2c9406..e4b871a2 100644 --- a/examples/aof7/docker-compose.yml +++ b/examples/aof7/docker-compose.yml @@ -3,7 +3,7 @@ services: image: itzg/minecraft-server environment: EULA: true - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # from .env CF_API_KEY: ${CF_API_KEY} CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-of-fabric-7 diff --git a/examples/atm8/docker-compose.yml b/examples/atm8/docker-compose.yml index fe8425b8..016dbcbb 100644 --- a/examples/atm8/docker-compose.yml +++ b/examples/atm8/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # allocate from https://console.curseforge.com/ and set in .env file CF_API_KEY: ${CF_API_KEY} CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8 diff --git a/examples/atm9/docker-compose.yml b/examples/atm9/docker-compose.yml index 19566044..1119a144 100644 --- a/examples/atm9/docker-compose.yml +++ b/examples/atm9/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # allocate from https://console.curseforge.com/ and set in .env file CF_API_KEY: ${CF_API_KEY} CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-9 diff --git a/examples/auto-cf/modpack-manifest/docker-compose.yml b/examples/auto-cf/modpack-manifest/docker-compose.yml index a5240bbd..459583b6 100644 --- a/examples/auto-cf/modpack-manifest/docker-compose.yml +++ b/examples/auto-cf/modpack-manifest/docker-compose.yml @@ -3,7 +3,7 @@ services: image: itzg/minecraft-server environment: EULA: true - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # allocate from https://console.curseforge.com/ and set in .env file CF_API_KEY: ${CF_API_KEY} CF_MODPACK_MANIFEST: /manifests/manifest.json diff --git a/examples/auto-cf/using-excludes/docker-compose.yml b/examples/auto-cf/using-excludes/docker-compose.yml index 9c2d83b8..1159bc78 100644 --- a/examples/auto-cf/using-excludes/docker-compose.yml +++ b/examples/auto-cf/using-excludes/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # allocate from https://console.curseforge.com/ and set in .env file CF_API_KEY: ${CF_API_KEY} CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/minecraft-eternal/files/4102634 diff --git a/examples/bettermc/docker-compose.yml b/examples/bettermc/docker-compose.yml index d38e0775..df9ea61c 100644 --- a/examples/bettermc/docker-compose.yml +++ b/examples/bettermc/docker-compose.yml @@ -3,7 +3,7 @@ services: image: itzg/minecraft-server environment: EULA: true - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file CF_API_KEY: ${CF_API_KEY} CF_SLUG: better-mc-fabric-bmc1 diff --git a/examples/bmc4/docker-compose.yml b/examples/bmc4/docker-compose.yml index 3caf0f98..168b7eeb 100644 --- a/examples/bmc4/docker-compose.yml +++ b/examples/bmc4/docker-compose.yml @@ -3,7 +3,7 @@ services: image: itzg/minecraft-server environment: EULA: true - MOD_PLATFORM: MODRINTH + MODPACK_PLATFORM: MODRINTH MODRINTH_MODPACK: https://modrinth.com/modpack/better-mc-forge-bmc4/version/v32.5 MODRINTH_EXCLUDE_FILES: | XaeroPlus diff --git a/examples/modrinth-modpack/docker-compose.yml b/examples/modrinth-modpack/docker-compose.yml index 010fa2b4..30b61292 100644 --- a/examples/modrinth-modpack/docker-compose.yml +++ b/examples/modrinth-modpack/docker-compose.yml @@ -7,7 +7,7 @@ services: - "25565:25565" environment: EULA: "TRUE" - MOD_PLATFORM: MODRINTH + MODPACK_PLATFORM: MODRINTH MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2 # or for auto-upgrading to latest # MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric diff --git a/examples/modrinth/local-modpack/docker-compose.yml b/examples/modrinth/local-modpack/docker-compose.yml index b0dfc976..fb3bb2f3 100644 --- a/examples/modrinth/local-modpack/docker-compose.yml +++ b/examples/modrinth/local-modpack/docker-compose.yml @@ -3,7 +3,7 @@ services: image: itzg/minecraft-server environment: EULA: true - MOD_PLATFORM: MODRINTH + MODPACK_PLATFORM: MODRINTH # Download the mrpack file from https://modrinth.com/modpack/cobblemon-fabric/version/1.4.1 and place in # modpacks directory next to this compose file. MODRINTH_MODPACK: /modpacks/Cobblemon Modpack [Fabric] 1.4.1.mrpack diff --git a/examples/one-block-modded/docker-compose.yml b/examples/one-block-modded/docker-compose.yml index 68910926..90a41338 100644 --- a/examples/one-block-modded/docker-compose.yml +++ b/examples/one-block-modded/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # CF_API_KEY=... must be set in .env file or as environment variable CF_API_KEY: ${CF_API_KEY} CF_SLUG: one-block-modded diff --git a/examples/pixelmon/docker-compose.yml b/examples/pixelmon/docker-compose.yml index 98c2ac4b..f55119ba 100644 --- a/examples/pixelmon/docker-compose.yml +++ b/examples/pixelmon/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE CF_API_KEY: # allocate from https://console.curseforge.com/ CF_SLUG: the-pixelmon-modpack CF_FILENAME_MATCHER: "9.1.2" diff --git a/examples/prominence2/docker-compose.yml b/examples/prominence2/docker-compose.yml index de63129b..db210128 100644 --- a/examples/prominence2/docker-compose.yml +++ b/examples/prominence2/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # allocate from https://console.curseforge.com/ and set in .env file CF_API_KEY: ${CF_API_KEY} CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/prominence-2-rpg diff --git a/examples/rad2/compose.yaml b/examples/rad2/compose.yaml index bf1d58ec..fa2520c7 100644 --- a/examples/rad2/compose.yaml +++ b/examples/rad2/compose.yaml @@ -6,7 +6,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # allocate from https://console.curseforge.com/ and set in .env file CF_API_KEY: ${CF_API_KEY} CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons-2 diff --git a/examples/rlcraft/docker-compose.yml b/examples/rlcraft/docker-compose.yml index e8be52d6..7aa7be5f 100644 --- a/examples/rlcraft/docker-compose.yml +++ b/examples/rlcraft/docker-compose.yml @@ -3,7 +3,7 @@ services: image: itzg/minecraft-server:java8-multiarch environment: EULA: true - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE # Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file CF_API_KEY: ${CF_API_KEY} CF_SLUG: rlcraft diff --git a/examples/valhesia5/docker-compose.yml b/examples/valhesia5/docker-compose.yml index febde4a0..a52022b2 100644 --- a/examples/valhesia5/docker-compose.yml +++ b/examples/valhesia5/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE CF_API_KEY: # allocate from https://console.curseforge.com/ CF_FORCE_SYNCHRONIZE: "true" CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560 diff --git a/examples/vault-hunters-1-18-2/docker-compose.yml b/examples/vault-hunters-1-18-2/docker-compose.yml index 393dc447..2e8aa584 100644 --- a/examples/vault-hunters-1-18-2/docker-compose.yml +++ b/examples/vault-hunters-1-18-2/docker-compose.yml @@ -5,7 +5,7 @@ services: - "25565:25565" environment: EULA: "true" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE CF_API_KEY: # allocate from https://console.curseforge.com/ CF_SLUG: vault-hunters-1-18-2 CF_FILENAME_MATCHER: "Update-10.0.0" diff --git a/scripts/start-configuration b/scripts/start-configuration index ed398a04..14e6ca98 100755 --- a/scripts/start-configuration +++ b/scripts/start-configuration @@ -158,15 +158,20 @@ then "${SCRIPTS:-/}start-rconcmds" fi -: "${MOD_PLATFORM:=}" +: "${MODPACK_PLATFORM:=${MOD_PLATFORM:-}}" + +if [[ $MODPACK_PLATFORM && $TYPE ]]; then + logWarning "Avoid setting TYPE and MODPACK_PLATFORM" +fi + case "${TYPE^^}" in AUTO_CURSEFORGE|MODRINTH|CURSEFORGE|FTB|FTBA) - MOD_PLATFORM="$TYPE" + MODPACK_PLATFORM="$TYPE" ;; esac -if [[ $MOD_PLATFORM ]]; then - case "${MOD_PLATFORM^^}" in +if [[ $MODPACK_PLATFORM ]]; then + case "${MODPACK_PLATFORM^^}" in FTB|CURSEFORGE) exec "${SCRIPTS:-/}start-deployCF" "$@" ;; @@ -184,7 +189,7 @@ if [[ $MOD_PLATFORM ]]; then ;; *) - logError "Invalid MOD_PLATFORM: '$MOD_PLATFORM'" + logError "Invalid MODPACK_PLATFORM: '$MODPACK_PLATFORM'" exit 1 ;; esac diff --git a/scripts/start-deployAutoCF b/scripts/start-deployAutoCF index 5df58a78..e4b9870d 100644 --- a/scripts/start-deployAutoCF +++ b/scripts/start-deployAutoCF @@ -26,7 +26,7 @@ resultsFile=/data/.install-curseforge.env isDebugging && set -x -ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE" +ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE" args=( --results-file="$resultsFile" diff --git a/scripts/start-deployModrinth b/scripts/start-deployModrinth index 503ec0dd..f22ff42f 100644 --- a/scripts/start-deployModrinth +++ b/scripts/start-deployModrinth @@ -16,13 +16,13 @@ resultsFile=/data/.install-modrinth.env : "${MODRINTH_DEFAULT_EXCLUDE_INCLUDES=/image/modrinth-exclude-include.json}" if [[ ! $MODRINTH_MODPACK ]]; then - logError "MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH" + logError "MODRINTH_MODPACK must be set when using TYPE/MODPACK_PLATFORM/MOD_PLATFORM of MODRINTH" exit 1 fi isDebugging && set -x -ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH" +ensureRemoveAllModsOff "MODPACK_PLATFORM=MODRINTH" args=( --results-file="$resultsFile" diff --git a/scripts/start-setupModpack b/scripts/start-setupModpack index 6ef6caeb..aace2b51 100755 --- a/scripts/start-setupModpack +++ b/scripts/start-setupModpack @@ -299,7 +299,7 @@ handleListings if [[ $MANIFEST ]]; then logError "MANIFEST is no longer supported." - logError " Use MOD_PLATFORM=AUTO_CURSEFORGE and CF_MODPACK_MANIFEST instead" + logError " Use MODPACK_PLATFORM=AUTO_CURSEFORGE and CF_MODPACK_MANIFEST instead" exit 1 fi diff --git a/tests/setuponlytests/auto_curseforge/docker-compose.yml b/tests/setuponlytests/auto_curseforge/docker-compose.yml index 934d0f01..27323504 100644 --- a/tests/setuponlytests/auto_curseforge/docker-compose.yml +++ b/tests/setuponlytests/auto_curseforge/docker-compose.yml @@ -4,7 +4,7 @@ services: environment: EULA: "true" SETUP_ONLY: "TRUE" - MOD_PLATFORM: AUTO_CURSEFORGE + MODPACK_PLATFORM: AUTO_CURSEFORGE CF_API_KEY: ${CF_API_KEY} CF_SLUG: the-pixelmon-modpack CF_FILENAME_MATCHER: "9.1.2"