From b277fc6268a4add2dc22017c7726d7fe408069d5 Mon Sep 17 00:00:00 2001 From: Oier Bravo Urtasun Date: Sun, 24 May 2026 05:20:02 +0200 Subject: [PATCH] feat(build-stack): fetch authlib-injector.jar during prep Server JVM agent needs runtime/authlib-injector.jar (gitignored); pull the latest yushijinhun release if absent so pre-bake doesn't crash-loop on a missing agent jar. Co-Authored-By: Claude Opus 4.7 (1M context) --- tooling/build-stack.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tooling/build-stack.sh b/tooling/build-stack.sh index 30e2d8a..7fce11b 100755 --- a/tooling/build-stack.sh +++ b/tooling/build-stack.sh @@ -72,6 +72,17 @@ prep() { have_script fetch-launcher.sh tooling/fetch-launcher.sh + log "fetch authlib-injector.jar (server JVM agent → drasl)" + if [ -f runtime/authlib-injector.jar ]; then + echo " runtime/authlib-injector.jar present — skipping" + else + ai_url="$(curl -fsSL https://api.github.com/repos/yushijinhun/authlib-injector/releases/latest \ + | jq -r '.assets[] | select(.name|test("authlib-injector-[0-9].*\\.jar$")) | .browser_download_url' | head -1)" + [ -n "$ai_url" ] && [ "$ai_url" != "null" ] || die "could not resolve authlib-injector release asset" + curl -fSL --retry 3 -o runtime/authlib-injector.jar "$ai_url" + echo " downloaded $(basename "$ai_url")" + fi + log "pre-bake server volume (TYPE=NEOFORGE install, one-shot, online)" # Bring minecraft up once so itzg installs NeoForge + mods into the volume, # then stop it. The party then runs offline against the baked volume.