Add support for youer and banner (#3484)

This commit is contained in:
kingcavespider1
2025-06-02 20:45:52 -05:00
committed by GitHub
parent 5416cedc1f
commit 6ede7e930c
3 changed files with 40 additions and 11 deletions
+7 -6
View File
@@ -10,11 +10,12 @@ resolveVersion
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
# Docs at https://mohistmc.com/mohistmc-api
mohistApiUrl="https://api.mohistmc.com/project/mohist"
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=mohist"
mohistType="${TYPE,,}"
mohistApiUrl="https://api.mohistmc.com/project/${mohistType}"
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}"
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then
logError "Mohist builds do not exist for ${VERSION}"
logError "${mohistType} builds do not exist for ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions"
logError " and set VERSION accordingly"
exit 1
@@ -25,7 +26,7 @@ if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
if ! buildNumber=$(
get --json-path '$[0].id' "${mohistApiUrl}/${VERSION}/builds"
); then
logError "failed to list Mohist builds for ${VERSION}"
logError "failed to list ${mohistType} builds for ${VERSION}"
exit 1
fi
MOHIST_BUILD="${buildNumber}"
@@ -40,10 +41,10 @@ if [[ -z "${downloadUrl}" ]]; then
exit 1
fi
SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar"
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
if [ ! -f "${SERVER}" ]; then
log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}"
log "Downloading ${mohistType^} build ${MOHIST_BUILD} for ${VERSION}"
get -o "${SERVER}" "${downloadUrl}"
fi