forked from zilliztech/milvus-cdc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (21 loc) · 1.09 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
PWD := $(shell pwd)
build:
$(MAKE) -C server build
test-go:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh)
lint-fix:
@echo "Running gofumpt fix"
@gofumpt -l -w ./
@echo "Running gci fix"
@gci write ./ -s standard -s default -s "prefix(github.com/milvus-io)" -s "prefix(github.com/zilliztech)" --custom-order --skip-generated
static-check:
@echo "Running go-lint check:"
@(env bash $(PWD)/scripts/run_go_lint.sh)
CORE_API := DataHandler MessageManager MetaOp Reader ChannelManager TargetAPI Writer FactoryCreator
SERVER_API := MetaStore MetaStoreFactory CDCService
generate-mockery:
@echo "Generating mockery server mocks..."
@cd "$(PWD)/core"; mockery -r --name "$(shell echo $(strip $(CORE_API)) | tr ' ' '|')" --output ./mocks --case snake --with-expecter
@cd "$(PWD)/server"; mockery -r --name "$(shell echo $(strip $(SERVER_API)) | tr ' ' '|')" --output ./mocks --case snake --with-expecter
@cd "$(PWD)/core"; mockery --srcpkg github.com/milvus-io/milvus-proto/go-api/v2/milvuspb --name MilvusServiceServer --output ./servermocks --case snake --with-expecter