Add make verify
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
This commit is contained in:
parent
fda7842bf4
commit
81680201d1
|
@ -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
|
||||
|
|
9
Makefile
9
Makefile
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue