Merge pull request #1585 from infosiftr/arch-not-supported

Add a separate explicit message for architectures which are not supported for an image
This commit is contained in:
yosifkit 2019-10-11 15:53:05 -07:00 committed by GitHub
commit 15a8d144f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -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"