fix(makefile): support TAGS in building order plugin

This commit is contained in:
zhourong 2020-12-08 16:32:06 +08:00
parent bee353617f
commit 1b2723dae0
4 changed files with 14 additions and 6 deletions

View File

@ -88,10 +88,10 @@ linter:
## make cluster: Run cluster including 4 nodes
cluster:install${TAGS}
@cd scripts && bash cluster.sh
@cd scripts && bash cluster.sh TAGS=${TAGS}
## make solo: Run one node in solo mode
solo:install${TAGS}
@cd scripts && bash solo.sh
@cd scripts && bash solo.sh TAGS=${TAGS}
.PHONY: tester build

View File

@ -9,10 +9,18 @@ raft:
@mkdir -p build
$(GO) build --buildmode=plugin -o build/raft.so order/etcdraft/*.go
raftent:
@mkdir -p build
$(GO) build --buildmode=plugin -modfile ../../goent.mod -o build/raft.so order/etcdraft/*.go
## make solo: build plugin (make plugin type= <solo>)
solo:
@mkdir -p build
$(GO) build --buildmode=plugin -o build/solo.so order/solo/*.go
soloent:
@mkdir -p build
$(GO) build --buildmode=plugin -modfile ../../goent.mod -o build/solo.so order/solo/*.go
## make plugins: build plugins (make plugin type=<raft> and <solo>)
plugins: raft solo

View File

@ -55,7 +55,7 @@ function prepare() {
print_blue "===> Building plugin"
cd "${PROJECT_PATH}"/internal/plugins
make raft
make raft${TAGS}
for ((i = 1; i < N + 1; i = i + 1)); do
cp -rf "${PROJECT_PATH}"/internal/plugins/build "${BUILD_PATH}"/node${i}/plugins
@ -65,7 +65,7 @@ function prepare() {
function compile() {
print_blue "===> Compiling bitxhub"
cd "${PROJECT_PATH}"
make install
make install${TAGS}
}
function splitWindow() {

View File

@ -21,11 +21,11 @@ function config() {
function compile() {
print_blue "===> Compileing bitxhub"
cd "${PROJECT_PATH}"
make install
make install${TAGS}
## build plugin
cd "${PROJECT_PATH}"/internal/plugins
make solo
make solo${TAGS}
}
function start() {