Skip to content

Commit

Permalink
Merge pull request #17027 from danidoni/make-diffend-handle-new-gems-…
Browse files Browse the repository at this point in the history
…instead-of-only-changes

Make xargs to ignore commands if stdin is empty
  • Loading branch information
danidoni authored Nov 4, 2024
2 parents ddc0826 + c6f74ff commit b57c53c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create_diffend_io_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
run: |
# Receive added and removed file names from the git diff, filter out everything besides the gem files and receive
# the basename without the gem file extension
ADDED_GEMS=( $(git diff --name-only --diff-filter=A origin/${GITHUB_BASE_REF} $GITHUB_SHA | grep .gem$ | xargs basename -s .gem) )
REMOVED_GEMS=( $(git diff --name-only --diff-filter=D origin/${GITHUB_BASE_REF} $GITHUB_SHA | grep .gem$ | xargs basename -s .gem) )
ADDED_GEMS=( $(git diff --name-only --diff-filter=A origin/${GITHUB_BASE_REF} $GITHUB_SHA | grep .gem$ | xargs -r basename -s .gem) )
REMOVED_GEMS=( $(git diff --name-only --diff-filter=D origin/${GITHUB_BASE_REF} $GITHUB_SHA | grep .gem$ | xargs -r basename -s .gem) )
COMMENT_TEXT="Please see the links listed bellow to review the changes applied to the gems:"$'\n'
Expand Down

0 comments on commit b57c53c

Please sign in to comment.