forked from hexdigest/gowrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (37 loc) · 977 Bytes
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
export GOBIN := $(PWD)/bin
export PATH := $(GOBIN):$(PATH)
export GOFLAGS := -mod=mod
./bin:
mkdir ./bin
./bin/gowrap: ./bin
go install ./cmd/gowrap
./bin/golangci-lint: ./bin
go install -modfile tools/go.mod github.com/golangci/golangci-lint/cmd/golangci-lint
./bin/goreleaser:
go install -modfile tools/go.mod github.com/goreleaser/goreleaser
./bin/minimock: ./bin
go install -modfile tools/go.mod github.com/gojuno/minimock/v3/cmd/minimock
.PHONY:
lint: ./bin/golangci-lint
./bin/golangci-lint run --enable=goimports --disable=unused --exclude=S1023,"Error return value" ./...
.PHONY:
test:
go test -race ./...
.PHONY:
generate: ./bin/gowrap ./bin/minimock
go generate ./...
.PHONY:
tidy:
go mod tidy -compat=1.17
cd tools && go mod tidy -compat=1.17
.PHONY:
all: ./bin/gowrap generate lint test
.PHONY:
release: ./bin/goreleaser
goreleaser release
.PHONY:
build: ./bin/goreleaser
goreleaser build --snapshot --rm-dist
.PHONY:
clean:
rm -rf ./bin