mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-05 15:03:17 +00:00
@@ -528,6 +528,9 @@ A [Mohist](https://github.com/Mohist-Community/Mohist) server can be used with
|
|||||||
|
|
||||||
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
|
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
|
||||||
|
|
||||||
|
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
|
||||||
|
|
||||||
|
-e VERSION=1.16.5 -e MOHIST_BUILD=374
|
||||||
|
|
||||||
## Running a Catserver type server
|
## Running a Catserver type server
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -6,6 +6,7 @@ set -e
|
|||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
requireVar VANILLA_VERSION
|
requireVar VANILLA_VERSION
|
||||||
|
: ${MOHIST_BUILD:=lastSuccessfulBuild}
|
||||||
|
|
||||||
mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/
|
mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/
|
||||||
mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/
|
mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/
|
||||||
@@ -17,12 +18,12 @@ if ! curl -X HEAD -o /dev/null -fsSL "${mohistJob}"; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
latestBuildRelPath=$(
|
buildRelPath=$(
|
||||||
curl -fsSL "${mohistJob}lastSuccessfulBuild/api/json" |
|
curl -fsSL "${mohistJob}${MOHIST_BUILD}/api/json" |
|
||||||
jq -r '.artifacts[0].relativePath'
|
jq -r '.artifacts[0].relativePath'
|
||||||
)
|
)
|
||||||
|
|
||||||
baseName=$(basename "${latestBuildRelPath}")
|
baseName=$(basename "${buildRelPath}")
|
||||||
if [[ ${baseName} != *-server.jar* ]]; then
|
if [[ ${baseName} != *-server.jar* ]]; then
|
||||||
log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}"
|
log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}"
|
||||||
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
|
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
|
||||||
@@ -34,7 +35,7 @@ export SERVER="/data/${baseName}"
|
|||||||
|
|
||||||
if [ ! -f ${SERVER} ]; then
|
if [ ! -f ${SERVER} ]; then
|
||||||
log "Downloading ${baseName}"
|
log "Downloading ${baseName}"
|
||||||
curl -o "${SERVER}" -fsSL "${mohistJob}lastSuccessfulBuild/artifact/${latestBuildRelPath}"
|
curl -o "${SERVER}" -fsSL "${mohistJob}${MOHIST_BUILD}/artifact/${buildRelPath}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export SKIP_LOG4J_CONFIG=true
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|||||||
Reference in New Issue
Block a user