diff --git a/Makefile b/Makefile index cba4eeef6..f34c19ec4 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ allclean: clean clean-cache test: test-gopkgs -verify: verify-godeps verify-fmt +verify: verify-godeps verify-fmt verify-generate # # build targets @@ -372,6 +372,17 @@ verify-fmt: exit 1; \ fi +verify-generate: generate + $(Q) git diff --quiet; ec="$$?"; \ + if [ "$$ec" != "0" ]; then \ + echo "ERROR: generated artifacts are not up-to-date."; \ + echo "ERROR:"; \ + git --no-pager diff | sed 's/^/ERROR: /g'; \ + echo "ERROR:"; \ + echo "ERROR: please run 'make generate' and commit these changes."; \ + exit "$$ec"; \ + fi + # # targets for installing dependencies #