aboutsummaryrefslogtreecommitdiff
path: root/ci/setup-toolchain.sh
diff options
context:
space:
mode:
authorLena <lena@omega>2026-07-01 00:00:00 +0000
committerLena <lena@omega>2026-07-01 00:00:00 +0000
commitf8253eace9d231b276024dd66406d890c1d954e1 (patch)
tree430e6078e0f4c08101b4388d2bb310c93972de74 /ci/setup-toolchain.sh
parent2c867cf95341daed1509e3cc48fec9de72cfe2f2 (diff)
downloadrsend-f8253eace9d231b276024dd66406d890c1d954e1.tar.gz
ci: pin the exact JDK release
The Adoptium "latest 17 GA" endpoint floats while versions promises never to float. Pin the full Temurin build and fetch it by version.
Diffstat (limited to 'ci/setup-toolchain.sh')
-rwxr-xr-xci/setup-toolchain.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/ci/setup-toolchain.sh b/ci/setup-toolchain.sh
index c832708..7aeaa42 100755
--- a/ci/setup-toolchain.sh
+++ b/ci/setup-toolchain.sh
@@ -12,10 +12,11 @@ dir=${TOOLCHAIN_DIR:-$HOME/toolchains}
sdk="$dir/android-sdk"
mkdir -p "$dir/dl"
-# JDK 17 (Temurin).
+# JDK (Temurin, exact pinned release; + must be %2B in the URL).
if [ ! -x "$dir/jdk17/bin/java" ]; then
- echo "setup: JDK $JDK_VERSION"
- curl -fsSL "https://api.adoptium.net/v3/binary/latest/${JDK_VERSION}/ga/linux/x64/jdk/hotspot/normal/eclipse" -o "$dir/dl/jdk.tar.gz"
+ echo "setup: JDK $JDK_RELEASE"
+ rel=$(printf '%s' "$JDK_RELEASE" | sed 's/+/%2B/')
+ curl -fsSL "https://api.adoptium.net/v3/binary/version/jdk-${rel}/linux/x64/jdk/hotspot/normal/eclipse" -o "$dir/dl/jdk.tar.gz"
mkdir -p "$dir/jdk17"
tar xzf "$dir/dl/jdk.tar.gz" -C "$dir/jdk17" --strip-components=1
fi