forked from openshift/check-payload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (25 loc) · 741 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
GO ?= go
.PHONY: all
all:
CGO_ENABLED=0 $(GO) build -ldflags="-X main.Commit=$$(git describe --tags --abbrev=8 --dirty --always --long)"
.PHONY: verify
verify: verify-space verify-generate verify-golangci
.PHONY: test
test:
go test -v ./...
.PHONY: verify-golangci
verify-golangci:
golangci-lint run
.PHONY: verify-space
verify-space: ## Ensure no whitespace at EOL
@if git -P grep -I -n '\s$$' -- ':(exclude)vendor'; then \
echo "^^^^ extra whitespace at EOL, please fix"; \
exit 1; \
fi
.PHONY: verify-clean
verify-clean:
git diff --exit-code ## Were the changes committed?
.PHONY: verify-generate
verify-generate: verify-clean
go generate ./internal/types
git diff --exit-code ## Did go generate produced anything new?