forked from qinqon/kube-admission-webhook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (32 loc) · 742 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
export GOFLAGS=-mod=vendor
export GO111MODULE=on
export GOBIN=~/go/bin
GOVERSION=$(shell hack/go-version.sh)
GO ?= $(GOBIN)/go$(GOVERSION)
export GITHUB_RELEASE := $(GOBIN)/github-release
all: test
$(GITHUB_RELEASE): $(GO)
$(GO) install ./vendor/github.com/aktau/github-release
$(GO):
hack/install-go.sh $(GOVERSION)
format: whitespace-format gofmt
vet: $(GO)
$(GO) vet ./pkg/...
whitespace-format:
hack/whitespace.sh format
gofmt: $(GO)
$(GO) fmt ./pkg/...
whitespace-check:
hack/whitespace.sh check
gofmt-check: $(GO)
test -z "`$(GOFMT) -l pkg/ `" || ($(GOFMT) -l pkg/ && exit 1)
test: $(GO) vet format
$(GO) test ./pkg/...
vendor:
$(GO) mod tidy
$(GO) mod vendor
release:
hack/release.sh
.PHONY: \
test \
vendor