forked from asdf-vm/asdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 725 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 725 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
MAIN_PACKAGE_PATH := ./cmd/asdf
TARGET_DIR := .
TARGET := asdf
LINKER_FLAGS = '-s'
# Not sure what the default location should be for builds
build: # test lint
go build -ldflags=${LINKER_FLAGS} -o=${TARGET_DIR}/${TARGET} ${MAIN_PACKAGE_PATH}
fmt:
go fmt ./...
go run mvdan.cc/gofumpt -l -w .
verify:
go mod verify
tidy:
go mod tidy -v
audit: verify vet test
test:
go test -coverprofile=/tmp/coverage.out -bench= -race ./...
cover: test
go tool cover -html=/tmp/coverage.out
lint: fmt
go run honnef.co/go/tools/cmd/staticcheck -tests -show-ignored ./...
go run github.com/mgechev/revive -set_exit_status ./...
vet: fmt
go vet ./...
run: build
${TARGET_DIR}/${TARGET}
.PHONY: fmt lint vet build test run