Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
handle edge case of no crates detected
  • Loading branch information
joao-paulo-parity committed Nov 23, 2022
commit f8c5db20ead45eec60d63a285813081c742c297f
4 changes: 4 additions & 0 deletions scripts/ci/gitlab/check-each-crate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ readarray -t workspace_crates < <(\
)

crates_total=${#workspace_crates[*]}
if [ "$crates_total" -lt 1 ]; then
>&2 echo "No crates detected for $PWD"
exit 1
fi

if [ "$crates_total" -lt "$groups_total" ]; then
# `crates_total / groups_total` would result in 0, so round it up to 1
Expand Down