-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 701 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (20 loc) · 701 Bytes
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
VERSION ?= dev
.PHONY: check test coverage vulncheck docker trivy verify build
check:
@test -z "$$(gofmt -s -l .)" || (echo "Unformatted files found. Run 'gofmt -s -w .' to fix them." && false)
golangci-lint run ./...
go build -tags goolm ./...
test:
go test -tags goolm -v -race ./...
coverage:
go test -tags goolm -v -race -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
vulncheck:
govulncheck -tags goolm ./...
docker:
hadolint docker/Dockerfile
trivy:
trivy fs --severity CRITICAL,HIGH .
verify: check test vulncheck trivy docker
build:
CGO_ENABLED=1 go build -trimpath -tags goolm -ldflags "-s -w -X main.AppVersion=$(VERSION)" -o matrix-cli ./cmd/matrix-cli