forked from ckotzbauer/sbom-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 830 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
TEMPDIR = ./.tmp
LINTCMD = $(TEMPDIR)/golangci-lint run --timeout 5m
GOSECCMD = $(TEMPDIR)/gosec ./...
all: build
build: fmt vet
goreleaser build --clean --single-target --snapshot
build-all: fmt vet
goreleaser build --clean --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:
bash hack/run-tests.sh
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 -- -d -b $(TEMPDIR)/ v1.52.2
curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -d -b $(TEMPDIR)/ v2.15.0