Add make verify

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
This commit is contained in:
Paulo Gomes 2022-01-26 10:57:54 +00:00
parent fda7842bf4
commit 81680201d1
No known key found for this signature in database
GPG Key ID: 9995233870E99BEE
2 changed files with 11 additions and 7 deletions

View File

@ -27,10 +27,5 @@ jobs:
uses: ./.github/actions/run-tests
env:
GOPATH: /github/home/go
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
git --no-pager diff
echo 'run make test and commit changes'
exit 1
fi
- name: Verify
run: make verify

View File

@ -254,6 +254,15 @@ endef
update-attributions:
./hack/update-attributions.sh
verify: update-attributions fmt vet manifests api-docs
ifneq (, $(shell git status --porcelain --untracked-files=no))
@{ \
echo "working directory is dirty:"; \
git --no-pager diff; \
exit 1; \
}
endif
.PHONY: help
help: ## Display this help menu
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)