Skip to content

Commit

Permalink
Fix depth check
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Nov 16, 2022
1 parent 0a1d097 commit 0feb2b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/github-actions/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ for tag in $tags; do
'
)"

if parent="$(bashbrew parents "$bashbrewImage" | grep "^${tag%%:*}:")" && [ -n "$parent" ]; then
if parent="$(bashbrew parents --depth=1 "$bashbrewImage" | grep "^${tag%%:*}:")" && [ -n "$parent" ]; then
if [ "$(wc -l <<<"$parent")" -ne 1 ]; then
echo >&2 "error: '$tag' has multiple parents in the same repository and this script can't handle that yet!"
echo >&2 "$parent"
exit 1
fi
parent="$(bashbrew parents "$bashbrewImage" | grep "^${tag%%:*}:" | tail -1)" # get the "ultimate" this-repo parent
parentBashbrewImage="${parent##*/}" # account for BASHBREW_NAMESPACE being set
parent="$(bashbrew list --uniq "$parentBashbrewImage")" # normalize
parentMeta="${metas["$parent"]}"
Expand Down

0 comments on commit 0feb2b9

Please sign in to comment.