forked from beyondstorage/beyond-tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 764 Bytes
/
Makefile
File metadata and controls
38 lines (30 loc) · 764 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
SHELL := /bin/bash
GO_BUILD_OPTION := -trimpath -tags netgo
.PHONY: check format vet lint build test
help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo " check to format, vet and lint "
@echo " build to create bin directory and build qsctl"
check: format vet
format:
@echo "go fmt"
@go fmt ./...
@echo "ok"
vet:
@echo "go vet"
@go vet ./...
@echo "ok"
build: tidy check
@echo "build dm"
@go build ${GO_BUILD_OPTION} -race -o ./bin/dm
@echo "ok"
test:
@echo "run test"
@go test -gcflags=-l -race -coverprofile=coverage.txt -covermode=atomic -v ./...
@go tool cover -html="coverage.txt" -o "coverage.html"
@echo "ok"
tidy:
@echo "Tidy and check the go mod files"
@go mod tidy
@go mod verify
@echo "Done"