未验证 提交 5d01f64b 编写于 作者: R Rongfeng Fu 提交者: GitHub

fix #74 (#76)

* update example

* fix #74
上级 c30d2373
......@@ -1215,9 +1215,9 @@ class ObdHome(object):
self._call_stdio('error', 'Deploy "%s" is %s. You could not reload an %s cluster.' % (name, deploy_info.status.value, deploy_info.status.value))
return False
# if deploy_info.config_status != DeployConfigStatus.NEED_RELOAD:
# self._call_stdio('error', 'Deploy config %s' % deploy_info.config_status.value)
# return False
if deploy_info.config_status == DeployConfigStatus.UNCHNAGE:
self._call_stdio('print', 'Deploy config is UNCHNAGE')
return True
self._call_stdio('verbose', 'Get deploy config')
deploy_config = deploy.deploy_config
......@@ -1542,9 +1542,9 @@ class ObdHome(object):
self._call_stdio('error', 'Not found %s in Deploy "%s" ' % (component, name))
return False
else:
if len(deploy_info.components) == 1:
component = deploy_info.components.keys()[0]
else:
for component in deploy_info.components:
break
if not component:
self._call_stdio('error', 'Specify the components you want to upgrade.')
return False
......
......@@ -186,7 +186,7 @@ def upgrade_route(plugin_context, current_repository, dest_repository, *args, **
yaml = YamlLoader(stdio)
try:
with open(upgrade_dep_path) as f:
with open(upgrade_dep_path, encoding='utf-8') as f:
data = yaml.load(f)
graph = ObVersionGraph(data)
route = graph.findShortestUpgradePath(current_repository, dest_repository)
......
......@@ -108,15 +108,16 @@ function build()
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'`
VERSION=$VERSION".`date +%s`"`
BUILD_DIR="$DIR/.build"
rm -fr $BUILD_DIR
mkdir -p $BUILD_DIR/lib/site-packages
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>/$CID/" | sed "s/<B_BRANCH>/$BRANCH/" | sed "s/<B_TIME>/$DATE/" | sed "s/<DEBUG>/$OBD_DUBUG/" | sed "s/<VERSION>/$VERSION/" > obd.py
pip install -r $req_fn.txt
pip install -r plugins-$req_fn.txt --target=$BUILD_DIR/lib/site-packages
pyinstaller --hidden-import=decimal --hidden-import=configparser -F 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
rm -f obd.py obd.spec
cp -r plugins $BUILD_DIR/plugins
rm -fr /usr/obd /usr/bin/obd
......
Name: ob-deploy
Version: 1.2.0
Version: 1.2.1
Release: %(echo $RELEASE)%{?dist}
# if you want use the parameter of rpm_create on build time,
# uncomment below
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册