1 Star 0 Fork 0

ronow2cn/xy-hserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
update_confs.sh 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
ronow2cn 提交于 2023-04-19 10:31 . update.by.bc
#!/bin/bash
source ./env
read -p "continue to update confs? [Yes/No]" x
[ "$x" != "Yes" ] && exit 1
# -------------------------------------
set -e
# retrive code rev
echo "retrieving code version ..."
BRANCH_CODE=$(git branch | grep \* | awk '{print $2}')
# read branch config
BRANCH_DATA_VAR=${BRANCH_CODE}_branch_data
BRANCH_DATA=${!BRANCH_DATA_VAR}
[ ! $BRANCH_DATA ] && BRANCH_DATA=$BRANCH_CODE
echo " data branch: $BRANCH_DATA"
# update gamedata
echo "updating gamedata ..."
rm -rf svrgo/game/app/gamedata/data
rm -rf svrgo/game/app/gamedata/filter
svn export --force "${SVN_GAMEDATA_URL}_${BRANCH_DATA}/go" svrgo/game/app/gamedata > /dev/null
svn export --force "${SVN_GAMEDATA_URL}_${BRANCH_DATA}/filter" svrgo/game/app/gamedata/filter > /dev/null
REV_GAMEDATA=$(svn export --force "${SVN_GAMEDATA_URL}_${BRANCH_DATA}/json" svrgo/game/app/gamedata/data|tail -1)
[[ "$REV_GAMEDATA" != "Exported revision"* ]] && exit 1
echo " gamedata: $REV_GAMEDATA"
# write version file
echo "preparing version file ..."
cat > .ver/VER_${BRANCH_CODE} << EOF
gamedata:
$BRANCH_DATA
$REV_GAMEDATA
EOF
# done
echo -e "\033[32mDone.\033[0m"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ronow2cn/xy-hserver.git
git@gitee.com:ronow2cn/xy-hserver.git
ronow2cn
xy-hserver
xy-hserver
master

搜索帮助