From 9fbbc18ee6b5efaca983cf609eb686f0a1211178 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 3 Jul 2023 11:09:15 -0700 Subject: [PATCH] Add "suite aliases" ("-oraclelinux8", "-bullseye", etc) --- generate-stackbrew-library.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index cbf4cecc1..e3c6672e6 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -79,17 +79,33 @@ for version; do ) for variant in oracle debian; do + export variant + df="Dockerfile.$variant" commit="$(dirCommit "$version" "$df")" variantAliases=( "${versionAliases[@]/%/-$variant}" ) variantAliases=( "${variantAliases[@]//latest-/}" ) + + case "$variant" in + debian) + suite="$(jq -r '.[env.version][env.variant].suite' versions.json)" + variantAliases=( "${versionAliases[@]/%/-$suite}" "${variantAliases[@]}" ) + variantAliases=( "${variantAliases[@]//latest-/}" ) + ;; + + oracle) + ol="$(jq -r '.[env.version][env.variant].variant | split("-")[0]' versions.json)" + variantAliases=( "${versionAliases[@]/%/-oraclelinux$ol}" "${variantAliases[@]}" ) + variantAliases=( "${variantAliases[@]//latest-/}" ) + ;; + esac + if [ "$variant" = "$defaultVariant" ]; then variantAliases=( "${versionAliases[@]}" "${variantAliases[@]}" ) fi # TODO if the list of architectures supported by MySQL ever is greater than that of the base image it's FROM, this list will need to be filtered - export variant variantArches="$(jq -r '.[env.version][env.variant].architectures | join(", ")' versions.json)" echo