Skip to content

Commit 9eb1fba

Browse files
authored
modrinth: rename input to MODRINTH_MODPACK (#2334)
1 parent 1cc0c8a commit 9eb1fba

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`.
601601
602602
[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.
603603
604-
The desired modpack project is specified with the `MODRINTH_PROJECT` environment variable and must be one of:
604+
The desired modpack project is specified with the `MODRINTH_MODPACK` environment variable and must be one of:
605605
606606
- The project "slug", which is located in the URL shown here:
607607
@@ -619,7 +619,7 @@ Furthermore, the resolved modpack version can be narrowed by setting `VERSION` t
619619
620620
The selected version can also be narrowed to a particular mod loader by setting `MODRINTH_LOADER` to either "forge", "fabric", or "quilt".
621621
622-
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
622+
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
623623
624624
![](docs/img/modrinth-version-id.drawio.png)
625625
@@ -933,7 +933,7 @@ https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar
933933
```
934934
> Blank lines and lines that start with a `#` will be ignored
935935
936-
> [This compose file](examples/docker-compose-mods-file.yml) shows another example of using this feature.
936+
> [This compose file](examples/mods-file/docker-compose.yml) shows another example of using this feature.
937937
938938
> It is recommended to combine this option with `REMOVE_OLD_MODS=TRUE` to ensure the mods/plugins remain consistent with the file's listing.
939939

docs/types-and-platforms/mod-platforms/modrinth-modpacks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

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

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

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

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

23-
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
23+
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
2424

2525
![](../../img/modrinth-version-id.drawio.png)

examples/modrinth-modpack/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ services:
1010
environment:
1111
EULA: "TRUE"
1212
MOD_PLATFORM: MODRINTH
13-
MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
13+
MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
1414
# or for auto-upgrading to latest
15-
# MODRINTH_PROJECT: https://modrinth.com/modpack/cobblemon-fabric
15+
# MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric
1616
# or just cobblemon-fabric or 5FFgwNNP
1717
# and could replace version URL with
1818
# MODRINTH_VERSION: nvrqJg44
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
MODS_FILE: /extras/mods.txt
1111
REMOVE_OLD_MODS: "true"
1212
ports:
13-
- 25565:25565
13+
- "25565:25565"
1414
volumes:
1515
- data:/data
1616
- ./mods.txt:/extras/mods.txt:ro

scripts/start-deployModrinth

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@ set -eu
66

77
resultsFile=/data/.install-modrinth.env
88

9-
requireVar MODRINTH_PROJECT
9+
: "${MODRINTH_MODPACK:=${MODRINTH_PROJECT:-}}"
1010
: "${MODRINTH_LOADER:=}"
1111
: "${MODRINTH_VERSION:=${MODRINTH_VERSION_ID:-}}"
1212

13+
if [[ ! $MODRINTH_MODPACK ]]; then
14+
log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH"
15+
exit 1
16+
fi
17+
1318
isDebugging && set -x
1419

1520
args=(
1621
--results-file="$resultsFile"
17-
--project="${MODRINTH_PROJECT}"
22+
--project="${MODRINTH_MODPACK}"
1823
--output-directory=/data
1924
)
2025

0 commit comments

Comments
 (0)