From cab387ad2a9f01cc0be9bfac6463090e9557bb83 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 11 Oct 2019 15:38:38 -0700 Subject: [PATCH] Add a separate explicit message for architectures which are not supported for an image This is to handle explicitly the case of images that were supported once but are no longer supported (like "openjdk" on s390x and ppc64le). --- .template-helpers/generate-dockerfile-links-partial.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.template-helpers/generate-dockerfile-links-partial.sh b/.template-helpers/generate-dockerfile-links-partial.sh index 5c0b595ec..3f0a1c91a 100755 --- a/.template-helpers/generate-dockerfile-links-partial.sh +++ b/.template-helpers/generate-dockerfile-links-partial.sh @@ -13,6 +13,11 @@ if [ -z "${BASHBREW_LIBRARY:-}" ]; then repo="https://github.com/docker-library/official-images/raw/master/library/$repo" fi +if [ -n "$ARCH_SPECIFIC_DOCS" ] && archTags="$(bashbrew cat --format '{{ range .Entries }}{{ if .HasArchitecture arch }}{{ .Tags | first }}{{ "\n" }}{{ end }}{{ end }}' "$repo")" && [ -z "$archTags" ]; then + echo "**WARNING:** THIS IMAGE *IS NOT SUPPORTED* ON THE \`$BASHBREW_ARCH\` ARCHITECTURE" + exit +fi + bashbrew cat \ - -F "$(dirname "$BASH_SOURCE")/$(basename "$BASH_SOURCE" .sh).tmpl" \ - "$repo" + -F "$(dirname "$BASH_SOURCE")/$(basename "$BASH_SOURCE" .sh).tmpl" \ + "$repo"