-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
37 lines (27 loc) · 834 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
TEMPDIR = ./.tmp
LINTCMD = $(TEMPDIR)/golangci-lint run --timeout 5m --skip-dirs ".*golang\/pkg\/mod.*"
GOSECCMD = $(TEMPDIR)/gosec ./...
all: build
build: fmt vet
goreleaser build --clean --single-target --snapshot
# Run against the configured Kubernetes cluster in ~/.kube/config
run: fmt vet
go run ./main.go
# Run go fmt against code
fmt:
go fmt ./...
# Run go vet against code
vet:
go vet ./...
test:
go test $(shell go list ./...) -coverprofile cover.out
lint:
$(LINTCMD)
lintsec:
$(GOSECCMD)
$(TEMPDIR):
mkdir -p $(TEMPDIR)
.PHONY: bootstrap-tools
bootstrap-tools: $(TEMPDIR)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMPDIR)/ v1.59.1
curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(TEMPDIR)/ v2.20.0