Skip to content

Commit

Permalink
chore: Add git diff when there are uncommitted changes (#5076)
Browse files Browse the repository at this point in the history
## Motivation

There are builds failing due to uncommitted changes for which providing only the list of uncommitted files is not enough to understand the problem especially when we cannot reproduce.

## Modifications

* Add `git diff` to each command to have more info
  • Loading branch information
essobedo authored Jul 7, 2023
1 parent da6b251 commit 4f5c96c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/camel-master-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; exit 1; }
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: Tar Maven Repo
shell: bash
run: |
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; exit 1; }
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: Report Build Failure
if: failure() || cancelled()
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; exit 1; }
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: Tar Maven Repo
shell: bash
run: |
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; exit 1; }
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
functional-extension-tests:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quarkus-master-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; exit 1; }
[[ -z $(git status --porcelain | grep -v antora.yml) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: Tar Maven Repo
shell: bash
run: |
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
- name: Fail if there are uncommitted changes
shell: bash
run: |
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; exit 1; }
[[ -z $(git status --porcelain) ]] || { echo 'There are uncommitted changes'; git status; git diff; exit 1; }
- name: Report Build Failure
if: failure() || cancelled()
run: |
Expand Down

0 comments on commit 4f5c96c

Please sign in to comment.