gm更新脚本修改

main
PC-202302260912\Administrator 2023-07-27 14:22:26 +08:00
parent 4cfcdbeb23
commit 092a14bd01
1 changed files with 9 additions and 10 deletions

View File

@ -30,7 +30,7 @@ if [ ! -d $BASE_DIR ];then
exit 7
fi
cd ${BASE_DIR}/miduo_server
cd ${BASE_DIR}/miduo_server || exit
git branch
git pull
@ -38,12 +38,12 @@ git pull
/data/update/script/check_json.py ${BASE_DIR}/miduo_server/conf/hotfix.json || exit
/data/update/script/check_json.py ${BASE_DIR}/miduo_server/conf/c_database_version.json || exit
cd ${BASE_DIR}/miduo_protocol
cd ${BASE_DIR}/miduo_protocol || exit
git branch
git pull
#protobuf
cd ${BASE_DIR}/miduo_protocol
cd ${BASE_DIR}/miduo_protocol || exit
rm -rf ./protobuf_temp
mkdir ./protobuf_temp
find ./protos -name "*.proto" -type f|xargs -i protoc --proto_path=./protos --java_out=./protobuf_temp {}
@ -56,7 +56,7 @@ yes|cp -r ./protobuf_temp/rpc/world ${BASE_DIR}/miduo_server/gamecommon/src/main
#gradlew build
cd ${BASE_DIR}/miduo_server
cd ${BASE_DIR}/miduo_server || exit
echo "gradlew clean..."
./gradlew clean
echo "gradlew build..."
@ -71,14 +71,13 @@ echo "gradlew jar..."
echo "gradlew copyJars..."
./gradlew copyJars
cd ${BASE_DIR}/data_excel
cd ${BASE_DIR}/data_excel || exit
svn up
cd ${BASE_DIR}/execl_to_txt
cd ${BASE_DIR}/execl_to_txt || exit
java -Dfile.encoding=UTF-8 -Djava.ext.dirs=./lib ExcelUtils
#热更地址
my_dir = ${BASE_DIR}/hotfix/conf
my_dir=${BASE_DIR}/hotfix/conf
if [ ! -d "$my_dir" ]; then
echo "创建文件夹"
mkdir -p ${my_dir}/server
@ -90,8 +89,8 @@ yes|cp -r ${BASE_DIR}/miduo_server/conf/c_database_version.json ${BASE_DIR}/hotf
yes|cp -r ${BASE_DIR}/miduo_server/conf/hotfix.json ${BASE_DIR}/hotfix/conf
cd ${BASE_DIR} || exit
find hotfix/conf/ -type f -name "*.txt"|egrep -v "c_database_version|hotfix"|xargs rm -rf
find hotfix/conf/ -type f -name "*.class" |xargs rm -rf
find hotfix/conf/ -type f -name "*.txt" | egrep -v "c_database_version|hotfix"|xargs rm -rf
find hotfix/conf/ -type f -name "*.class" | xargs rm -rf
cat ${BASE_DIR}/miduo_server/conf/c_database_version.json |awk -F':' '/tables/{print $2}'|tr -d '"'|tr '|' '\n'|xargs -i find ${BASE_DIR}/miduo_server/conf/server -name "{}.txt"|xargs -i cp {} ${BASE_DIR}/hotfix/conf/server
cat ${BASE_DIR}/miduo_server/conf/hotfix.json |grep name|awk -F'"' '{print $4}'|xargs -i find ${BASE_DIR}/miduo_server/serverlogic/build -name "{}"|xargs -i cp {} ${BASE_DIR}/hotfix/conf/hotswap