22 lines
421 B
Makefile
22 lines
421 B
Makefile
GODEPS = $(shell git ls-files '*.go' go.mod go.sum)
|
|
GOBIN = $(shell go env GOPATH)/bin/
|
|
|
|
undocker: $(GODEPS)
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
|
|
|
.PHONY: test
|
|
test:
|
|
go test -race -cover ./...
|
|
|
|
.PHONY: lint
|
|
lint:
|
|
go vet ./...
|
|
$(GOBIN)staticcheck -f stylish ./...
|
|
|
|
.INTERMEDIATE: coverage.out
|
|
coverage.out: $(GODEPS)
|
|
go test -coverprofile $@ ./...
|
|
|
|
coverage.html: coverage.out
|
|
go tool cover -html=$< -o $@
|