Skip to content

Commit dffa840

Browse files
authored
Add a CI script to catch uncommitted files (#71)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent a86591b commit dffa840

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- run: make lint
2323
- run: make test
2424
- run: make dist
25+
- run: ./scripts/ci-quality-no-uncommitted-files.sh
2526

2627
- run: gh config set prompt disabled
2728
env:

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ jobs:
2222
- run: make lint
2323
- run: make test
2424
- run: make dist
25+
- run: ./scripts/ci-quality-no-uncommitted-files.sh
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
set -o errexit
4+
set -o nounset
5+
6+
if [ -n "$(git status --porcelain)" ]
7+
then
8+
echo "ERROR: Found uncommitted files in repository:" >&2
9+
git status --porcelain >&2
10+
exit 1
11+
fi

0 commit comments

Comments
 (0)