diff --git a/README.md b/README.md index dc8128d7a15..5a67ce17f3a 100644 --- a/README.md +++ b/README.md @@ -511,8 +511,10 @@ Extra variables: A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with -e TYPE=MAGMA + -e MAGMA_VERSION=9f3a3c25 -> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc. +> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2", "1.16.5", etc. +> To switch the MAGMA version, you need to take the name of the desired tag from the magmafoundation git repository, [for example, to version 1.18](https://git.magmafoundation.org/magmafoundation/Magma-1-18-x/-/tags). ### Running a Mohist server diff --git a/scripts/start-deployMagma b/scripts/start-deployMagma index 9a6f92ea275..4908414cb4e 100755 --- a/scripts/start-deployMagma +++ b/scripts/start-deployMagma @@ -4,9 +4,11 @@ . "${SCRIPTS:-/}start-utils" isDebugging && set -x +: "${MAGMA_VERSION:=}" + resolveVersion -if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VERSION}/latest"); then +if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VERSION}/latest/${MAGMA_VERSION}"); then log "ERROR failed to locate latest Magma download for ${VERSION}. Is that version supported?" exit 1 fi