Skip to content

Commit

Permalink
modrinth: rename input to MODRINTH_MODPACK (#2334)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Aug 13, 2023
1 parent 1cc0c8a commit 9eb1fba
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`.
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of:
The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of:
- The project "slug", which is located in the URL shown here:
Expand All @@ -619,7 +619,7 @@ Furthermore, the resolved modpack version can be narrowed by setting `VERSION` t
The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt".
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_PROJECT`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_MODPACK`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
![](docs/img/modrinth-version-id.drawio.png)
Expand Down Expand Up @@ -933,7 +933,7 @@ https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar
```
> Blank lines and lines that start with a `#` will be ignored
> [This compose file](examples/docker-compose-mods-file.yml) shows another example of using this feature.
> [This compose file](examples/mods-file/docker-compose.yml) shows another example of using this feature.
> It is recommended to combine this option with `REMOVE_OLD_MODS=TRUE` to ensure the mods/plugins remain consistent with the file's listing.
Expand Down
4 changes: 2 additions & 2 deletions docs/types-and-platforms/mod-platforms/modrinth-modpacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[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.

The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of:
The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of:

- The project "slug", which is located in the URL shown here:

Expand All @@ -20,6 +20,6 @@ Furthermore, the resolved modpack version can be narrowed by setting `VERSION` t

The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt".

Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_PROJECT`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here
Instead of auto resolving, a specific version of modpack file can be specified by passing the version's page URL to `MODRINTH_MODPACK`, such as <https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2> or by setting `MODRINTH_VERSION` to the version ID or number located in the Metadata section, as shown here

![](../../img/modrinth-version-id.drawio.png)
4 changes: 2 additions & 2 deletions examples/modrinth-modpack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ services:
environment:
EULA: "TRUE"
MOD_PLATFORM: MODRINTH
MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
# or for auto-upgrading to latest
# MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric
# MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric
# or just cobblemon-fabric or 5FFgwNNP
# and could replace version URL with
# MODRINTH_VERSION: nvrqJg44
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
MODS_FILE: /extras/mods.txt
REMOVE_OLD_MODS: "true"
ports:
- 25565:25565
- "25565:25565"
volumes:
- data:/data
- ./mods.txt:/extras/mods.txt:ro
Expand Down
File renamed without changes.
9 changes: 7 additions & 2 deletions scripts/start-deployModrinth
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ set -eu

resultsFile=/data/.install-modrinth.env

requireVar MODRINTH_PROJECT
: "${MODRINTH_MODPACK:=${MODRINTH_PROJECT:-}}"
: "${MODRINTH_LOADER:=}"
: "${MODRINTH_VERSION:=${MODRINTH_VERSION_ID:-}}"

if [[ ! $MODRINTH_MODPACK ]]; then
log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH"
exit 1
fi

isDebugging && set -x

args=(
--results-file="$resultsFile"
--project="${MODRINTH_PROJECT}"
--project="${MODRINTH_MODPACK}"
--output-directory=/data
)

Expand Down

0 comments on commit 9eb1fba

Please sign in to comment.