Corrected calculation of Canyon download URL (#3226)

This commit is contained in:
Geoff Bourne 2025-01-03 17:01:32 -06:00 committed by GitHub
parent 621bafb4f2
commit 03f9037668
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 3 deletions

View file

@ -0,0 +1,13 @@
services:
mc:
image: itzg/minecraft-server:java8
environment:
EULA: true
TYPE: canyon
VERSION: b1.7.3
ports:
- "25565:25565"
volumes:
- mc-data:/data
volumes:
mc-data:

View file

@ -18,10 +18,10 @@ githubUrl="https://github.com/KoboDev/SupplyAndDemand/releases/download"
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
buildRelPath=$(
jq '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
jq -r '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
)
buildNumber=$(
jq '.number'<<< "$canyonBuildJSON"
jq -r '.number'<<< "$canyonBuildJSON"
)
baseName=$(basename "${buildRelPath}")
@ -50,7 +50,7 @@ if [ ! -f "$SERVER" ]; then
fi
curl -fsSL -o "$SERVER" "$downloadUrl"
if [ ! -f "$SERVER" ]; then
logError "Failed to download from $downloadUrl (status=$?)"
logError "Failed to download from $downloadUrl"
exit 3
fi
fi