-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 762 Bytes
/
Makefile
File metadata and controls
39 lines (29 loc) · 762 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
39
BIN_DIR=bin
vendor:
if [ ! -d "vendor" ] || [ -z "$(shell ls -A vendor)" ]; then go mod vendor; fi
build:
make vendor
go build -o ./bin/wt ./main.go
release:
make vendor
env CGO_ENABLED=0 xgo --targets=darwin/*,linux/amd64,linux/386,windows/* --dest ./$(BIN_DIR)/ --out wt .
lint:
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./services/...
staticcheck ./configuration/...
staticcheck ./dto/...
imports:
goimports -d -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
format:
go fmt $(shell go list ./... | grep -v /vendor/)
tests:
go test ./...
code-check:
make lint
make tests
code-clean:
make imports
make format
check-security:
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...