-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 679 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (28 loc) · 679 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
.PHONY: build run test cover
GOVULNCHECK_VERSION=v1.8.0
build:
go build -o ./bin/app ./src/cmd/app/main.go
run-test:
ifeq ($(OS),Windows_NT)
$env:GO_ENV="test"; go run ./src/cmd/app/main.go
else
GO_ENV=test go run ./src/cmd/app/main.go
endif
run-prod:
ifeq ($(OS),Windows_NT)
$env:GO_ENV="prod"; go run ./src/cmd/app/main.go
else
GO_ENV=prod go run ./src/cmd/app/main.go
endif
test-clean:
go clean -testcache
test:
go test -p 1 -v ./...
cover:
go test -p 1 -coverprofile="coverage.out" ./...
cover-html:
go tool cover -html="coverage.out"
vulncheck-install:
go install golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION)
vulncheck:
govulncheck ./...