Skip to content

Commit

Permalink
chore: Correct check-generate (#53)
Browse files Browse the repository at this point in the history
## Motivation

Checking generated files should not be limited to `_enum.go` files only.
  • Loading branch information
nieomylnieja authored Feb 16, 2024
1 parent 68dc219 commit d55ac3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/check-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -e

ENUM_PATH="*_enum.go"
TMP_DIR=$(mktemp -d)

cleanup_git() {
Expand All @@ -16,7 +15,7 @@ main() {

make -C "$TMP_DIR" generate

CHANGED=$(git -C "$TMP_DIR" diff --name-only "${ENUM_PATH}")
CHANGED=$(git -C "$TMP_DIR" diff --name-only)
if [ -n "${CHANGED}" ]; then
printf >&2 "There are generated changes that are not committed:\n%s\n" "$CHANGED"
exit 1
Expand Down

0 comments on commit d55ac3c

Please sign in to comment.