Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch "latest" variants from OpenJDK to Temurin #265

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,6 @@ for version; do
${aliases[$version]:-}
)

latestVariant="$(jq -r '
.[env.version].variants
| map(
select(
(
# LTS Java releases
# TODO add jdk17 once the longevity of vanilla builds from http://jdk.java.net/17/ are determined (or alternative vanilla builds are made available)
startswith("jdk11")
or startswith("jdk8")
) and (
split("/")[1]
| test("^openjdk-(?!slim-)")
)
)
)[0]
' versions.json)"

defaultOpenjdkVariant="$(jq -r '
.[env.version].variants
| map(
Expand Down Expand Up @@ -130,6 +113,23 @@ for version; do
["$defaultTemurinVariant"]='temurin'
)

export defaultTemurinVariant
latestVariant="$(jq -r '
.[env.version].variants
| map(
select(
(
# LTS Java releases
startswith("jdk17")
or startswith("jdk11")
or startswith("jdk8")
) and (
split("/")[1] == env.defaultTemurinVariant
)
)
)[0]
' versions.json)"

for variantDir in "${variants[@]}"; do
javaVariant="$(dirname "$variantDir")" # "jdk8", "jre11", etc
vendorVariant="$(basename "$variantDir")" # "openjdk-slim-buster", "corretto", etc.
Expand All @@ -150,7 +150,7 @@ for version; do
done

# "jdk8"
if [ "$vendorVariant" = "$defaultOpenjdkVariant" ]; then
if [ "$vendorVariant" = "$defaultTemurinVariant" ]; then
javaAliases=( "${versionAliases[@]/%/-$javaVariant}" )
javaAliases=( "${javaAliases[@]//latest-/}" )
variantAliases+=( "${javaAliases[@]}" )
Expand Down
44 changes: 22 additions & 22 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"10.0": {
"sha512": "fe46db8794f066882b30e7a94bd8d3dbcf29e8e8ffaf67c1355846755745a7c9eafd124819283f218bcf410921a485b44b57b56fd6251fb99d67d95f3dd36826",
"variants": [
"jdk17/corretto",
"jdk17/temurin-focal",
"jre17/temurin-focal",
"jdk17/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal",
"jdk11/openjdk-bullseye",
"jre11/openjdk-bullseye",
"jdk11/openjdk-buster",
Expand All @@ -14,8 +16,8 @@
"jdk11/openjdk-slim-buster",
"jre11/openjdk-slim-buster",
"jdk11/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal",
"jdk8/temurin-focal",
"jre8/temurin-focal",
"jdk8/openjdk-bullseye",
"jre8/openjdk-bullseye",
"jdk8/openjdk-buster",
Expand All @@ -24,18 +26,18 @@
"jre8/openjdk-slim-bullseye",
"jdk8/openjdk-slim-buster",
"jre8/openjdk-slim-buster",
"jdk8/corretto",
"jdk8/temurin-focal",
"jre8/temurin-focal"
"jdk8/corretto"
],
"version": "10.0.22"
},
"10.1": {
"sha512": "ad25f3393324ce42619d6aeeb685186322776b5ba4583453c5e16957fa71cd64fa9f30e379985d57a701be43e9475991312893ee87979e69dd2b51de06510060",
"variants": [
"jdk17/corretto",
"jdk17/temurin-focal",
"jre17/temurin-focal",
"jdk17/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal",
"jdk11/openjdk-bullseye",
"jre11/openjdk-bullseye",
"jdk11/openjdk-buster",
Expand All @@ -44,18 +46,18 @@
"jre11/openjdk-slim-bullseye",
"jdk11/openjdk-slim-buster",
"jre11/openjdk-slim-buster",
"jdk11/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal"
"jdk11/corretto"
],
"version": "10.1.0-M16"
},
"8.5": {
"sha512": "729387275cce4a0900289722f6c70ebcf7aee924af671b110b8ea8577fd6d045d47f17d526c8db5fd41c8590102e7f5100e95e89f7fd511b941565812ecbed35",
"variants": [
"jdk17/corretto",
"jdk17/temurin-focal",
"jre17/temurin-focal",
"jdk17/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal",
"jdk11/openjdk-bullseye",
"jre11/openjdk-bullseye",
"jdk11/openjdk-buster",
Expand All @@ -65,8 +67,8 @@
"jdk11/openjdk-slim-buster",
"jre11/openjdk-slim-buster",
"jdk11/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal",
"jdk8/temurin-focal",
"jre8/temurin-focal",
"jdk8/openjdk-bullseye",
"jre8/openjdk-bullseye",
"jdk8/openjdk-buster",
Expand All @@ -75,18 +77,18 @@
"jre8/openjdk-slim-bullseye",
"jdk8/openjdk-slim-buster",
"jre8/openjdk-slim-buster",
"jdk8/corretto",
"jdk8/temurin-focal",
"jre8/temurin-focal"
"jdk8/corretto"
],
"version": "8.5.81"
},
"9.0": {
"sha512": "38392b651fabe706fb0524c52849601299494178010bb8077af383232c20bbbda1aec4ab8898adb2cc37c07583ff0e9d3c7038ce55a22bc68c3641641b47fd1a",
"variants": [
"jdk17/corretto",
"jdk17/temurin-focal",
"jre17/temurin-focal",
"jdk17/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal",
"jdk11/openjdk-bullseye",
"jre11/openjdk-bullseye",
"jdk11/openjdk-buster",
Expand All @@ -96,8 +98,8 @@
"jdk11/openjdk-slim-buster",
"jre11/openjdk-slim-buster",
"jdk11/corretto",
"jdk11/temurin-focal",
"jre11/temurin-focal",
"jdk8/temurin-focal",
"jre8/temurin-focal",
"jdk8/openjdk-bullseye",
"jre8/openjdk-bullseye",
"jdk8/openjdk-buster",
Expand All @@ -106,9 +108,7 @@
"jre8/openjdk-slim-bullseye",
"jdk8/openjdk-slim-buster",
"jre8/openjdk-slim-buster",
"jdk8/corretto",
"jdk8/temurin-focal",
"jre8/temurin-focal"
"jdk8/corretto"
],
"version": "9.0.64"
}
Expand Down
8 changes: 6 additions & 2 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ _bashbrew_list() {

allVariants='[]'
for javaVersion in 17 11 8; do
# OpenJDK, followed by all other variants alphabetically
for vendorVariant in openjdk{,-slim}-{bullseye,buster} corretto temurin-focal; do
# Eclipse Temurin, followed by OpenJDK, and then all other variants alphabetically
for vendorVariant in \
temurin-focal \
openjdk{,-slim}-{bullseye,buster} \
corretto \
; do
for javaVariant in {jdk,jre}"$javaVersion"; do
export variant="$javaVariant/$vendorVariant"
if image="$(jq -nr '
Expand Down