Allow tags and architectures to be properly empty
This commit is contained in:
parent
299efbdf8f
commit
5a6e2136a5
|
|
@ -27,4 +27,4 @@ bashbrew cat --format '
|
||||||
{{- ",\n" -}}
|
{{- ",\n" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
' "$repo" | sort -u | tr '\n' ' ' | sed 's/, $/\n/'
|
' "$repo" | sort -u | tr '\n' ' ' | sed -r -e 's/, $/\n/' -e 's/^[[:space:]]+|[[:space:]]+$//g'
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ templateArchVar='{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture a
|
||||||
tags="$(bashbrew list --uniq "$repo" | cut -d: -f2-)"
|
tags="$(bashbrew list --uniq "$repo" | cut -d: -f2-)"
|
||||||
tags=( $tags )
|
tags=( $tags )
|
||||||
toFetch=()
|
toFetch=()
|
||||||
for tag in "$tags"; do
|
for tag in "${tags[@]}"; do
|
||||||
if ! bashbrew cat --format '
|
if ! bashbrew cat --format '
|
||||||
'"$templateHeader"'
|
'"$templateHeader"'
|
||||||
{{- $e := $.TagEntry -}}
|
{{- $e := $.TagEntry -}}
|
||||||
|
|
|
||||||
|
|
@ -137,8 +137,8 @@ for image in "${images[@]}"; do
|
||||||
if [ -n "$ARCH_SPECIFIC_DOCS" ]; then
|
if [ -n "$ARCH_SPECIFIC_DOCS" ]; then
|
||||||
partial='**No supported tags found!**'$'\n\n''It is very likely that `%%REPO%%` does not support the currently selected architecture (`'"$BASHBREW_ARCH"'`).'
|
partial='**No supported tags found!**'$'\n\n''It is very likely that `%%REPO%%` does not support the currently selected architecture (`'"$BASHBREW_ARCH"'`).'
|
||||||
else
|
else
|
||||||
echo >&2 'error: missing TAGS for '"$repo"'!'
|
# opensuse, etc
|
||||||
exit 1
|
partial='**No supported tags**'
|
||||||
fi
|
fi
|
||||||
elif [ -n "$ARCH_SPECIFIC_DOCS" ]; then
|
elif [ -n "$ARCH_SPECIFIC_DOCS" ]; then
|
||||||
jenkinsJobUrl="https://doi-janky.infosiftr.net/job/multiarch/job/$BASHBREW_ARCH/job/$repo/"
|
jenkinsJobUrl="https://doi-janky.infosiftr.net/job/multiarch/job/$BASHBREW_ARCH/job/$repo/"
|
||||||
|
|
@ -149,7 +149,7 @@ for image in "${images[@]}"; do
|
||||||
|
|
||||||
echo ' ARCHES => arches.sh "'"$repo"'"'
|
echo ' ARCHES => arches.sh "'"$repo"'"'
|
||||||
arches="$("$helperDir/arches.sh" "$repo")"
|
arches="$("$helperDir/arches.sh" "$repo")"
|
||||||
[ "$arches" ]
|
[ -n "$arches" ] || arches='**No supported architectures**'
|
||||||
replace_field "$targetFile" 'ARCHES' "$arches"
|
replace_field "$targetFile" 'ARCHES' "$arches"
|
||||||
|
|
||||||
echo ' CONTENT => '"$repo"'/content.md'
|
echo ' CONTENT => '"$repo"'/content.md'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue