Skip to content

Commit

Permalink
Handle no results by grep not to exit
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed May 23, 2024
1 parent 4f8ab8d commit c483343
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jenkins-scripts/dsl/dsl_checks.bash
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ fi
# Check that whiteListedTargetBranches are non empty in all generated gazebo_libs
# see https://github.com/gazebo-tooling/release-tools/pull/1144
# For other jobs the use case is valid since pr can be enabled on all branches
empty_branches_on_github_triggered=$(grep '<whiteListTargetBranches></whiteListTargetBranches>' -- {gz_,sdformat}*{-abichecker-,-pr_any-}*.xml)
empty_branches_on_github_triggered=$(grep '<whiteListTargetBranches></whiteListTargetBranches>' \
-- {gz_,sdformat}*{-abichecker-,-pr_any-}*.xml || true)
if [[ -n ${empty_branches_on_github_triggered} ]]; then
echo "Unexpected whiteListTargetBranches without values. It will trigger all branches:"
echo "${empty_branches_on_github_triggered}"
Expand Down

0 comments on commit c483343

Please sign in to comment.