New logger with color and specific types. Code cleanup (#3108)

This commit is contained in:
Tristan
2024-10-22 23:04:38 +02:00
committed by GitHub
parent a356c6810e
commit bef7b4719f
38 changed files with 424 additions and 428 deletions

View File

@@ -9,20 +9,19 @@ isDebugging && set -x
: "${CANYON_BUILD:=lastSuccessfulBuild}"
if [ "${VERSION}" != "b1.7.3" ]; then
log "ERROR: Canyon server type only supports VERSION=b1.7.3"
logError "Canyon server type only supports VERSION=b1.7.3"
exit 1
fi
canyonJob="https://jenkins.glass-launcher.net/job/Canyon"
canyonJob="https://canyonmodded.p0rtal.gay/job/Canyonmodded"
githubUrl="https://github.com/KoboDev/SupplyAndDemand/releases/download"
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
buildRelPath=$(
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
jq -r '.artifacts[0].relativePath'
)
jq '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
)
buildNumber=$(
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
jq -r '.number'
jq '.number'<<< "$canyonBuildJSON"
)
baseName=$(basename "${buildRelPath}")
@@ -51,7 +50,7 @@ if [ ! -f "$SERVER" ]; then
fi
curl -fsSL -o "$SERVER" "$downloadUrl"
if [ ! -f "$SERVER" ]; then
log "ERROR: failed to download from $downloadUrl (status=$?)"
logError "Failed to download from $downloadUrl (status=$?)"
exit 3
fi
fi