-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 710 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 710 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
40
GO := GO111MODULE=on go
GOPATH ?= $(shell $(GO) env GOPATH)
GOBIN ?= $(GOPATH)/bin
default: build fmt lint test
fmt:
@echo "FORMATTING"
find . -type f -name '*.go' -not -path './vendor/*' | xargs gofumpt -s -l -w | tee /dev/stderr
lint: fmt
@echo "LINTING"
GOBIN=$(GOBIN) ./lint.sh
tidy:
@echo "TIDYING"
$(GO) mod tidy -v
check-tidy: tidy
git diff --quiet
test:
@echo "TESTING"
$(GO) test -race -v ./...
test-coverage:
$(GO) test -race -coverprofile=coverage.txt -covermode=atomic
build: build.sh
@echo "BUILDING"
./build.sh
clean:
rm -rf build dist
rm -f $(BIN)
test-release:
goreleaser release --rm-dist --skip-publish --snapshot
.PHONY: test fmt lint tidy clean build test-release