!10 构建脚本添加版本号参数,构建时候可以指定版本号

Merge pull request !10 from zhangxubo/master
This commit is contained in:
opengauss-bot
2022-09-21 03:06:01 +00:00
committed by Gitee
2 changed files with 20 additions and 4 deletions

View File

@ -18,24 +18,30 @@ yum install python3 python3-devel
3. 下载`openGauss-connector-python-psycopg2`仓库代码,进入到根目录下,执行
```
sh build.sh -bd /data/compile/openGauss-server/dest/ # dest为编译openGauss-server编译结果目录
sh build.sh -bd /data/compile/openGauss-server/dest/ -v 3.0.0
```
**说明** \
-bd: 指定openGauss数据库构建结果目录 \
-v: 指定构建包的版本号。不指定则默认为3.0.0
编译完成后的驱动,在 `output` 目录下。
#### 软件下载
社区每日构建,提供三套环境已经编译好的驱动包供使用,下载路径如下:
其中 **VERSION** 为当前最新的版本号。
openEuler-aarch64:\
https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/arm/openGauss-3.0.0-openEuler-aarch64-Python.tar.gz
https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/arm/openGauss-**VERSION**-openEuler-aarch64-Python.tar.gz
CentOS-x86_64: \
https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86/openGauss-3.0.0-CentOS-x86_64-Python.tar.gz
https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86/openGauss-**VERSION**-CentOS-x86_64-Python.tar.gz
openEuler-x86_64: \
https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86_openEuler/openGauss-3.0.0-openEuler-x86_64-Python.tar.gz
https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86_openEuler/openGauss-**VERSION**-openEuler-x86_64-Python.tar.gz
#### 使用说明

View File

@ -57,6 +57,7 @@ function print_help()
echo "Usage: $0 [OPTION]
-h|--help show help information.
-bd|--serverlib_dir the directory of sever binarylibs.
-v|--version package version number.
"
}
@ -96,6 +97,15 @@ while [ $# -gt 0 ]; do
serverlib_dir=$2
shift 2
;;
-v|--version)
if [ "$2" != "" ]; then
echo "Package openGauss python driver version is : $2"
version_number=$2
else
echo "No version number was specified. Use the default $version_number"
fi
shift 2
;;
*)
echo "Internal Error: option processing error: $1" 1>&2
echo "please input right paramtenter, the following command may help you"