Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit 15499ba

Browse files
committed
Only error if the git state is clean before we run gazelle.
1 parent 6740c50 commit 15499ba

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ if [[ ! -z ${files} ]]; then
4949
exit 1
5050
fi
5151

52-
# Check gazelle
53-
bazel run //:gazelle
54-
if [ "$(git status --porcelain)" ]; then
55-
echo "BUILD files out of date. Run `bazel run //:gazelle` to update them."
56-
exit 1
52+
if [ ! "$(git status --porcelain)" ]; then
53+
# Check gazelle if everything is up to date.
54+
bazel run //:gazelle
55+
if [ "$(git status --porcelain)" ]; then
56+
echo "BUILD files out of date. Run `bazel run //:gazelle` to update them."
57+
exit 1
58+
fi
5759
fi

0 commit comments

Comments
 (0)