Add "Supported architectures" section
This commit is contained in:
parent
72ceaca5f8
commit
c87c899907
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
repo="${1:-}"
|
||||
if [ -z "$repo" ]; then
|
||||
echo >&2 "usage: $0 repo"
|
||||
echo >&2 " ie: $0 hylang"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if we haven't set BASHBREW_LIBRARY explicitly (like Jenkins does, for example), don't trust the local library
|
||||
if [ -z "${BASHBREW_LIBRARY:-}" ]; then
|
||||
repo="https://github.com/docker-library/official-images/raw/master/library/$repo"
|
||||
fi
|
||||
|
||||
bashbrew cat --format '
|
||||
{{- range .Entries -}}
|
||||
{{- range .Architectures -}}
|
||||
{{- $ns := archNamespace . -}}
|
||||
{{- if $ns -}}
|
||||
[
|
||||
{{- end -}}
|
||||
`{{- . -}}`
|
||||
{{- if $ns -}}
|
||||
](https://hub.docker.com/r/{{- $ns -}}/{{- $.RepoName -}}/)
|
||||
{{- end -}}
|
||||
{{- ",\n" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
' "$repo" | sort -u | tr '\n' ' ' | sed 's/, $/\n/'
|
||||
|
|
@ -13,6 +13,9 @@
|
|||
- **Maintained by**:
|
||||
%%MAINTAINER%%
|
||||
|
||||
- **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64))
|
||||
%%ARCHES%%
|
||||
|
||||
- **Published image artifact details**:
|
||||
[repo-info repo's `repos/%%REPO%%/` directory](https://github.com/docker-library/repo-info/blob/master/repos/%%REPO%%) ([history](https://github.com/docker-library/repo-info/commits/master/repos/%%REPO%%))
|
||||
(image metadata, transfer size, etc)
|
||||
|
|
|
|||
|
|
@ -105,6 +105,11 @@ for image in "${images[@]}"; do
|
|||
[ "$partial" ]
|
||||
replace_field "$targetFile" 'TAGS' "$partial"
|
||||
|
||||
echo ' ARCHES => arches.sh "'"$repo"'"'
|
||||
arches="$("$helperDir/arches.sh" "$repo")"
|
||||
[ "$arches" ]
|
||||
replace_field "$targetFile" 'ARCHES' "$arches"
|
||||
|
||||
echo ' CONTENT => '"$repo"'/content.md'
|
||||
replace_field "$targetFile" 'CONTENT' "$(cat "$repo/content.md")"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue