-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 718 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (30 loc) · 718 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
30
31
32
33
34
35
36
37
38
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
# Name for the output binary
BINARY_NAME=hiver
MAIN_PATH=./cmd/hiver
all: build
build:
$(GOBUILD) -o $(BINARY_NAME) -v $(MAIN_PATH)
test:
$(GOTEST) -v ./...
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
run:
$(GOBUILD) -o $(BINARY_NAME) -v $(MAIN_PATH)
./$(BINARY_NAME)
.PHONY: build test clean run
tidy:
go fmt ./...
gofmt -s -w .
go mod tidy -v
audit:
go mod verify
go vet ./...
go run honnef.co/go/tools/cmd/staticcheck@latest -checks=all,-ST1000,-U1000,-ST1003,-ST1005,-ST1020,-ST1021,-ST1022,-SA1019,-SA1029 ./...
go run golang.org/x/vuln/cmd/govulncheck@latest ./...
go test -race -buildvcs -vet=off ./...