Skip to content

Commit

Permalink
Merge pull request #981 from infosiftr/suite-aliases
Browse files Browse the repository at this point in the history
Add "suite aliases" ("-oraclelinux8", "-bullseye", etc)
  • Loading branch information
yosifkit authored Dec 15, 2023
2 parents 64f9436 + 9fbbc18 commit c4a7f36
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,34 @@ for version; do
versionAliases+=( ${aliases[$version]:-} )

for variant in oracle debian; do
export variant

df="Dockerfile.$variant"
[ -s "$version/$df" ] || continue
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
Expand Down

0 comments on commit c4a7f36

Please sign in to comment.