1 Star 0 Fork 0

ronow2cn/xy-hserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cproto.sh 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
ronow2cn 提交于 2023-04-19 10:31 . update.by.bc
#!/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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ronow2cn/xy-hserver.git
git@gitee.com:ronow2cn/xy-hserver.git
ronow2cn
xy-hserver
xy-hserver
master

搜索帮助