[REV] distinguish Enterprise Edition

This commit is contained in:
glyasai 2019-09-20 10:19:36 +08:00
parent 6829f90816
commit aa363d2a1e

View File

@ -114,7 +114,11 @@ build::image() {
elif [ "$1" = "mesh-data-panel" ];then
echo "mesh-data-panel not need build";
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}" -tags 'license' -o ${DOCKER_PATH}/${BASE_NAME}-$1 ./cmd/$1
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
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
fi
echo "---> build image:$1"
sed "s/__RELEASE_DESC__/${release_desc}/" Dockerfile > Dockerfile.release