-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
54 lines (40 loc) · 1.16 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.PHONY: proto build
GCTPKG = $(shell go list -e)
LINTPKG = github.com/golangci/golangci-lint/cmd/[email protected]
LINTBIN = $(GOPATH)/bin/golangci-lint
COMMIT_HASH=$(shell git rev-parse --short HEAD || echo "GitNotFound")
get:
export GOPROXY=https://mirrors.aliyun.com/goproxy/
GO111MODULE=on go get $(GCTPKG)
linter:
export GOPROXY=https://mirrors.aliyun.com/goproxy/
GO111MODULE=on go get $(GCTPKG)
GO111MODULE=on go get $(LINTPKG)
golangci-lint run --verbose --skip-dirs=web-exchange --skip-dirs=models | tee /dev/stderr
test:
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
update_deps:
export GOPROXY=https://mirrors.aliyun.com/goproxy/
GO111MODULE=on go mod verify
GO111MODULE=on go mod tidy
rm -rf vendor
GO111MODULE=on go mod vendor
fmt:
gofmt -l -w -s $(shell find . -path './vendor' -prune -o -type f -name '*.go' -print)
proto:
for d in srv; do \
for f in $$d/**/**/proto/*.proto; do \
protoc --proto_path=${GOPATH}/src:. --micro_out=. --go_out=. $$f; \
echo compiled: $$f; \
done \
done
build:
./bin/build.sh
run:
docker-compose up
rund:
docker-compose up -d
down:
docker-compose down
clear:
./bin/clear.sh