-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (30 loc) · 1.02 KB
/
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
export GO111MODULE := on
.DEFAULT_GOAL := build
.PHONY: build
build: test
go build ./...
.PHONY: vendor
vendor:
go mod vendor
.PHONY: test
test:
go test -coverprofile cover.out -cover -race ./... && go tool cover -func cover.out
.PHONY: test-integration
test-integration:
go test -tags=integration -timeout 60s -coverprofile cover.out -cover -race ./... && go tool cover -func cover.out
.PHONY: bustest
bustest: gofmt
cd bus/testenv && make
.PHONY: show-gomod-version
show-gomod-version:
@echo This would be the version for your go.mod
@echo "v0.0.0-"`TZ=utc git log -1 --pretty=format:%cd --date=format-local:"%Y%m%d%H%M%S" HEAD`"-"`git rev-parse --short=12 HEAD`
.PHONY: gofmt
gofmt:
GO111MODULE=off go fmt ./...
.PHONY: testenv
testenv:
@cd bus/testenv && make --no-print-directory
.PHONY: mocks
mocks:
docker run --user $$(id -u):$$(id -g) --rm -w /work -v ${PWD}:/work vektra/mockery:v2.45.1 --name testClient --dir /work/pkg/genericcli --output /work/pkg/genericcli --filename generic_mock_test.go --testonly --inpackage