Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .buildkite/cleanup-pr-build-branches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ echo '--- :robot_face: Use bot for Git operations'
source use-bot-for-git

echo "--- :mag: Listing pr-build/* branches on origin"
mapfile -t branches < <(
# `mapfile` is Bash 4+; macOS CI agents ship Bash 3.2, so use a portable
# `while read` loop instead.
branches=()
while IFS= read -r branch; do
branches+=("$branch")
done < <(
git ls-remote --heads origin 'refs/heads/pr-build/*' \
| awk '{print $2}' \
| sed 's|^refs/heads/||'
Expand Down
Loading