fix(makefile): support TAGS in building order plugin
This commit is contained in:
parent
bee353617f
commit
1b2723dae0
4
Makefile
4
Makefile
|
@ -88,10 +88,10 @@ linter:
|
||||||
|
|
||||||
## make cluster: Run cluster including 4 nodes
|
## make cluster: Run cluster including 4 nodes
|
||||||
cluster:install${TAGS}
|
cluster:install${TAGS}
|
||||||
@cd scripts && bash cluster.sh
|
@cd scripts && bash cluster.sh TAGS=${TAGS}
|
||||||
|
|
||||||
## make solo: Run one node in solo mode
|
## make solo: Run one node in solo mode
|
||||||
solo:install${TAGS}
|
solo:install${TAGS}
|
||||||
@cd scripts && bash solo.sh
|
@cd scripts && bash solo.sh TAGS=${TAGS}
|
||||||
|
|
||||||
.PHONY: tester build
|
.PHONY: tester build
|
||||||
|
|
|
@ -9,10 +9,18 @@ raft:
|
||||||
@mkdir -p build
|
@mkdir -p build
|
||||||
$(GO) build --buildmode=plugin -o build/raft.so order/etcdraft/*.go
|
$(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>)
|
## make solo: build plugin (make plugin type= <solo>)
|
||||||
solo:
|
solo:
|
||||||
@mkdir -p build
|
@mkdir -p build
|
||||||
$(GO) build --buildmode=plugin -o build/solo.so order/solo/*.go
|
$(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>)
|
## make plugins: build plugins (make plugin type=<raft> and <solo>)
|
||||||
plugins: raft solo
|
plugins: raft solo
|
||||||
|
|
|
@ -55,7 +55,7 @@ function prepare() {
|
||||||
|
|
||||||
print_blue "===> Building plugin"
|
print_blue "===> Building plugin"
|
||||||
cd "${PROJECT_PATH}"/internal/plugins
|
cd "${PROJECT_PATH}"/internal/plugins
|
||||||
make raft
|
make raft${TAGS}
|
||||||
|
|
||||||
for ((i = 1; i < N + 1; i = i + 1)); do
|
for ((i = 1; i < N + 1; i = i + 1)); do
|
||||||
cp -rf "${PROJECT_PATH}"/internal/plugins/build "${BUILD_PATH}"/node${i}/plugins
|
cp -rf "${PROJECT_PATH}"/internal/plugins/build "${BUILD_PATH}"/node${i}/plugins
|
||||||
|
@ -65,7 +65,7 @@ function prepare() {
|
||||||
function compile() {
|
function compile() {
|
||||||
print_blue "===> Compiling bitxhub"
|
print_blue "===> Compiling bitxhub"
|
||||||
cd "${PROJECT_PATH}"
|
cd "${PROJECT_PATH}"
|
||||||
make install
|
make install${TAGS}
|
||||||
}
|
}
|
||||||
|
|
||||||
function splitWindow() {
|
function splitWindow() {
|
||||||
|
|
|
@ -21,11 +21,11 @@ function config() {
|
||||||
function compile() {
|
function compile() {
|
||||||
print_blue "===> Compileing bitxhub"
|
print_blue "===> Compileing bitxhub"
|
||||||
cd "${PROJECT_PATH}"
|
cd "${PROJECT_PATH}"
|
||||||
make install
|
make install${TAGS}
|
||||||
|
|
||||||
## build plugin
|
## build plugin
|
||||||
cd "${PROJECT_PATH}"/internal/plugins
|
cd "${PROJECT_PATH}"/internal/plugins
|
||||||
make solo
|
make solo${TAGS}
|
||||||
}
|
}
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
|
|
Loading…
Reference in New Issue