From 3680ef8a6d9d0e29acb4e1e321de3deaab1127ff Mon Sep 17 00:00:00 2001 From: Hyatt Date: Sun, 28 Nov 2021 00:02:35 +0000 Subject: [PATCH] Update 'build-minecraft.jenkins' --- build-minecraft.jenkins | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build-minecraft.jenkins b/build-minecraft.jenkins index 5148158..ec1fdad 100644 --- a/build-minecraft.jenkins +++ b/build-minecraft.jenkins @@ -12,7 +12,7 @@ def baseImageTag = "latest" def alpineJavaPackage = "openjdk17" // PaperMC URL -def paperMCDownload = "https://papermc.io/api/v2/projects/paper/versions/1.17.1/builds/388/downloads/paper-1.17.1-388.jar" +def paperVersion = "1.17.1" // Minecraft Configuration def memoryMin = "1g" @@ -70,7 +70,10 @@ RUN sed -i -r -e 's/v3.14\\/community/edge\\/community/' /etc/apk/repositories & apk add --no-cache ${alpineJavaPackage} curl && \\ addgroup -S -g 1000 minecraft && \\ adduser -S minecraft -G minecraft -h /minecraft -u 1000 && \\ - curl -Ls "${paperMCDownload}" -o /minecraft/paper-mc.jar && \\ + paperBuild=$(curl --silent --location --fail https://papermc.io/api/v2/projects/paper/versions/${paperVersion} | jq '.builds | max') && \\ + paperFile=$(curl --silent --location --fail https://papermc.io/api/v2/projects/paper/versions/${paperVersion}/builds/${paperBuild} | jq '.downloads.application.name') && \\ + paperDownload="https://papermc.io/api/v2/projects/paper/versions/${paperVersion}/builds/${paperBuild}/downloads/${paperFile}" && \\ + curl --location --fail --silent ${paperDownload} -o /minecraft/paper-mc.jar && \\ mkdir /minecraft/data && \\ mkdir /minecraft/html && \\ chown -R minecraft:minecraft /minecraft