代码拉取完成,页面将自动刷新
#!/bin/bash
source ./env
# retrive code rev
echo "retrieving code version ..."
BRANCH_CODE=$(git branch | grep \* | awk '{print $2}')
# read branch config
BRANCH_PROTO_VAR=${BRANCH_CODE}_branch_proto
BRANCH_PROTO=${!BRANCH_PROTO_VAR}
[ ! $BRANCH_PROTO ] && BRANCH_PROTO=$BRANCH_CODE
echo " proto branch: $BRANCH_PROTO"
# dirs
SERVER_DIR=$(realpath .)
SHARED_DIR=${SERVER_DIR}/../${PROJ_NAME}-shared
# update
svn update ${SHARED_DIR}/server
mkdir -p ${SHARED_DIR}/server/${BRANCH_PROTO}/proto
rm -rf ${SHARED_DIR}/server/${BRANCH_PROTO}/proto/server
cp -r ${SERVER_DIR}/svrgo/internal/proto ${SHARED_DIR}/server/${BRANCH_PROTO}/proto/server
cp -r ${SERVER_DIR}/svrgo/internal/errorcode ${SHARED_DIR}/server/${BRANCH_PROTO}/proto/server
cd ${SHARED_DIR}/server/${BRANCH_PROTO}/proto
node ../../gen_TS.js
cd - > /dev/null
while read -r a b; do
if [ "$a" == '!' ]; then
svn rm $b
elif [ "$a" == '?' ]; then
svn add $b
fi
done <<EOF
$(svn status ${SHARED_DIR}/server/${BRANCH_PROTO}/proto)
EOF
svn commit -m 'proto: updated' ${SHARED_DIR}/server/${BRANCH_PROTO}/proto
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。