-
Notifications
You must be signed in to change notification settings - Fork 121
/
Makefile
36 lines (29 loc) · 1.94 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
proto-gen:
go get -u github.com/gogo/[email protected]
protoc --go_out=./extension/aop/trace/api --go-grpc_out=./extension/aop/trace/api -I${GOPATH}/pkg/mod/github.com/gogo/[email protected] -I./extension/aop/trace/api/jaeger/jaeger_model.proto -I. ./extension/aop/trace/api/ioc_golang/aop/trace/trace.proto
protoc --go_out=./extension/aop/watch/api --go-grpc_out=./extension/aop/watch/api ./extension/aop/watch/api/ioc_golang/aop/watch/watch.proto
protoc --go_out=./extension/aop/dynamic_plugin/api --go-grpc_out=./extension/aop/dynamic_plugin/api ./extension/aop/dynamic_plugin/api/ioc_golang/aop/dynamic_plugin/dynamic_plugin.proto
protoc --go_out=./extension/aop/list/api --go-grpc_out=./extension/aop/list/api ./extension/aop/list/api/ioc_golang/aop/list/list.proto
protoc --go_out=./extension/aop/call/api --go-grpc_out=./extension/aop/call/api ./extension/aop/call/api/ioc_golang/aop/call/call.proto
protoc --go_out=./extension/aop/log/api --go-grpc_out=./extension/aop/log/api ./extension/aop/log/api/ioc_golang/aop/log/log.proto
protoc --go_out=./extension/aop/monitor/api --go-grpc_out=./extension/aop/monitor/api ./extension/aop/monitor/api/ioc_golang/aop/monitor/monitor.proto
mockery-gen:
cd extension/aop/monitor && sudo mockery --name=interceptorImplIOCInterface --inpackage --filename=interceptor_mock.go --structname=mockInterceptorImplIOCInterface
cd extension/aop/transaction && sudo mockery --name=contextIOCInterface --inpackage --filename=context_mock.go --structname=mockContextIOCInterface
gen-all: proto-gen
sudo iocli gen
sudo make mockery-gen
sudo make imports
tidy-all:
go mod tidy
imports:
goimports -local github.com/alibaba/ioc-golang -w .
lint: tidy-all
golangci-lint run
test-all:
go test ./... -cover -p 1
release-all: gen-all test-all
mkdir -p .release/ioc-golang
cd iocli && make build-all-platform && mv ./.release ../.release/iocli
cp -r `ls` ./.release/ioc-golang
cd ./.release && tar -czvf ./ioc-golang.tar.gz ./ioc-golang