diff --git a/rpm/build.sh b/rpm/build.sh index 564b9d86f6cc06c86d36c37cba75787656e6ded2..96a0e0e7bc5cd8896724247ba7037c47f79d0487 100755 --- a/rpm/build.sh +++ b/rpm/build.sh @@ -104,7 +104,7 @@ function build() cd2workdir DIR=`pwd` cd .. - VERSION=`grep 'Version:' ob-deploy.spec | head -n1 | awk -F' ' '{print $2}'` + VERSION=`grep 'Version:' rpm/ob-deploy.spec | head -n1 | awk -F' ' '{print $2}'` CID=`git log |head -n1 | awk -F' ' '{print $2}'` BRANCH=`git branch | grep -e "^\*" | awk -F' ' '{print $2}'` DATE=`date '+%b %d %Y %H:%M:%S'` @@ -115,9 +115,9 @@ function build() mkdir -p $BUILD_DIR/mirror/remote wget https://mirrors.aliyun.com/oceanbase/OceanBase.repo -O $BUILD_DIR/mirror/remote/OceanBase.repo cat _cmd.py | sed "s//$CID/" | sed "s//$BRANCH/" | sed "s//$DATE/" | sed "s//$OBD_DUBUG/" | sed "s//$VERSION/" > obd.py - pip install -r $req_fn.txt | exit 1 - pip install -r plugins-$req_fn.txt --target=$BUILD_DIR/lib/site-packages | exit 1 - pyinstaller --hidden-import=decimal --hidden-import=configparser -F obd.py | exit 1 + pip install -r $req_fn.txt || exit 1 + pip install -r plugins-$req_fn.txt --target=$BUILD_DIR/lib/site-packages || exit 1 + pyinstaller --hidden-import=decimal --hidden-import=configparser -F obd.py || exit 1 rm -f obd.py obd.spec cp -r plugins $BUILD_DIR/plugins rm -fr /usr/obd /usr/bin/obd diff --git a/rpm/ob-deploy.spec b/rpm/ob-deploy.spec index e5d877f8eaca9bc75753d448bef9978b63b51216..5e08e82e29e27832471f9589e88a8a4b1573cc0a 100644 --- a/rpm/ob-deploy.spec +++ b/rpm/ob-deploy.spec @@ -1,5 +1,5 @@ Name: ob-deploy -Version: 1.2.1 +Version: 1.2.0 Release: %(echo $RELEASE)%{?dist} # if you want use the parameter of rpm_create on build time, # uncomment below