Skip to content

Commit

Permalink
Allow tags and architectures to be properly empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Jul 3, 2019
1 parent 299efbd commit 5a6e213
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .template-helpers/arches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ bashbrew cat --format '
{{- ",\n" -}}
{{- 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'
2 changes: 1 addition & 1 deletion .template-helpers/git-prefetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ templateArchVar='{{- $arch := $archSpecific | ternary arch ($e.HasArchitecture a
tags="$(bashbrew list --uniq "$repo" | cut -d: -f2-)"
tags=( $tags )
toFetch=()
for tag in "$tags"; do
for tag in "${tags[@]}"; do
if ! bashbrew cat --format '
'"$templateHeader"'
{{- $e := $.TagEntry -}}
Expand Down
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ for image in "${images[@]}"; do
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"'`).'
else
echo >&2 'error: missing TAGS for '"$repo"'!'
exit 1
# opensuse, etc
partial='**No supported tags**'
fi
elif [ -n "$ARCH_SPECIFIC_DOCS" ]; then
jenkinsJobUrl="https://doi-janky.infosiftr.net/job/multiarch/job/$BASHBREW_ARCH/job/$repo/"
Expand All @@ -149,7 +149,7 @@ for image in "${images[@]}"; do

echo ' ARCHES => arches.sh "'"$repo"'"'
arches="$("$helperDir/arches.sh" "$repo")"
[ "$arches" ]
[ -n "$arches" ] || arches='**No supported architectures**'
replace_field "$targetFile" 'ARCHES' "$arches"

echo ' CONTENT => '"$repo"'/content.md'
Expand Down

0 comments on commit 5a6e213

Please sign in to comment.