Skip to content

Commit

Permalink
Add cli-dist Make option to build spctl distributed pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
powerkimhub committed Jun 15, 2021
1 parent 8ff75aa commit 8bd4d8c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
default:
default: cli
@echo -e '\t[CB-Spider] build ./bin/cb-spider....'
@go mod download
@go build -o bin/cb-spider ./api-runtime
@go build -o ./interface/spctl ./interface/cli/spider/spider.go
dyna plugin plug dynamic:
dyna plugin plug dynamic: cli
@echo -e '\t[CB-Spider] build ./bin/cb-spider with plugin mode...'
@go mod download
@go build -tags dyna -o bin/cb-spider-dyna ./api-runtime
Expand All @@ -14,3 +13,16 @@ cc:
clean clear:
@echo -e '\t[CB-Spider] cleaning...'
@rm -rf bin/cb-spider bin/cb-spider-dyna bin/cb-spider-arm
@rm -rf dist-tmp

cli-dist: cli
@echo -e '\t[CB-Spider] tar spctl... to dist'
@mkdir -p /tmp/spider/dist/conf
@cp ./interface/spctl ./interface/grpc_conf.yaml /tmp/spider/dist 1> /dev/null
@cp ./conf/log_conf.yaml /tmp/spider/dist/conf 1> /dev/null
@mkdir -p ./dist
@tar -zcvf ./dist/spctl-`(date +%Y.%m.%d.%H)`.tar.gz -C /tmp/spider/dist ./ 1> /dev/null
@rm -rf /tmp/spider
cli:
@echo -e '\t[CB-Spider] build ./interface/spctl...'
@go build -o ./interface/spctl ./interface/cli/spider/spider.go

0 comments on commit 8bd4d8c

Please sign in to comment.