Skip to content

Commit 3f001cf

Browse files
committed
Improve the diff comparison command.
This skips trailing line endings, and any `.git` directories.
1 parent 7bd6361 commit 3f001cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/reusable-compare-built-files-v1.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ jobs:
9191
run: mkdir artifacts
9292

9393
- name: Create a list of files that have changed
94-
run: diff -rq ${{ github.workspace }}/build ${{ github.workspace }}/build-server | sed "s|${{ github.workspace }}/||g" > artifacts/file-changes.txt
94+
run: diff --strip-trailing-cr --recursive --exclude='.git' ${{ github.workspace }}/build ${{ github.workspace }}/build-server | sed "s|${{ github.workspace }}/||g" > artifacts/file-changes.txt
9595

9696
- name: Create a list of files that have changed
97-
run: diff -r ${{ github.workspace }}/build ${{ github.workspace }}/build-server | sed "s|${{ github.workspace }}/||g" > artifacts/changes.diff
97+
run: diff --strip-trailing-cr --recursive --exclude='.git' ${{ github.workspace }}/build ${{ github.workspace }}/build-server | sed "s|${{ github.workspace }}/||g" > artifacts/changes.diff
9898

9999
- name: Save PR number
100100
run: echo "${EVENT_NUMBER}" > ./artifacts/NR

0 commit comments

Comments
 (0)