[FIX] rbd-api is not successfully packaged

This commit is contained in:
glyasai 2019-10-09 18:23:01 +08:00
parent 0a671e7cab
commit 0e3afc4ad1
2 changed files with 6 additions and 5 deletions

View File

@ -28,9 +28,8 @@ buildTime=$(date +%F-%H)
git_commit=$(git log -n 1 --pretty --format=%h)
release_desc=${VERSION}-${git_commit}-${buildTime}
ENTERPRISE=false
if [ "${ENTERPRISE}" = "true" ];then
ENTERPRISE=true
release_desc=${VERSION}-enterprise-${git_commit}-${buildTime}
fi
build::node() {
@ -90,7 +89,8 @@ build::binary() {
elif [ "$1" = "gateway" ];then
docker run --rm -e GOOS=${GOOS} -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GATEWAY_GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o ${OUTPATH} ./cmd/$1
else
if [ "${ENTERPRISE}" = "true" ];then
if [ "${ENTERPRISE}" = "true" ];then
echo "---> ENTERPRISE:${ENTERPRISE}"
docker run --rm -e GOOS=${GOOS} -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" --ldflags "-w -s -X github.com/goodrain/rainbond/util/license.enterprise=${ENTERPRISE}" -o ${OUTPATH} ./cmd/$1
else
docker run --rm -e GOOS=${GOOS} -v `pwd`:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o ${OUTPATH} ./cmd/$1
@ -119,7 +119,8 @@ build::image() {
echo "mesh-data-panel not need build";
else
if [ "${ENTERPRISE}" = "true" ];then
docker run --rm -v ${REPO_PATH}:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -tags 'license' -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/$1
echo "---> ENTERPRISE:${ENTERPRISE}"
docker run --rm -v ${REPO_PATH}:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" --ldflags "-w -s -X github.com/goodrain/rainbond/util/license.enterprise=${ENTERPRISE}" -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/$1
else
docker run --rm -v ${REPO_PATH}:${WORK_DIR} -w ${WORK_DIR} -it golang:${GO_VERSION} go build -ldflags "-w -s -X github.com/goodrain/rainbond/cmd.version=${release_desc}" -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/$1
fi

View File

@ -29,7 +29,7 @@ import (
"github.com/Sirupsen/logrus"
)
var enterprise string
var enterprise = "false"
// LicInfo license information
type LicInfo struct {