update_script/update_gm.sh

46 lines
1.3 KiB
Bash
Raw Normal View History

2023-07-21 18:52:07 +08:00
#!/bin/bash
2023-07-26 17:51:33 +08:00
. /etc/profile
2023-07-21 18:52:07 +08:00
#########################################################################
# File Name: jl_gm_update.sh
# Created on: 2019-09-04 10:54:43
# Author: Wu Kang
# Last Modified: 2022-07-13 16:48:25
# Description:
#########################################################################
BASE_DIR="/data/update/project/miduo_gm"
#表文件地址,不同渠道用表不一样
table=$1
TABLE_DIR="/data/update/project/${table}"
#excel
2023-07-26 17:51:33 +08:00
cd ${TABLE_DIR}/data_excel/ || exit
2023-07-21 18:52:07 +08:00
svn up
2023-07-26 17:51:33 +08:00
cd ${TABLE_DIR}/execl_to_txt/ || exit
2023-07-21 18:52:07 +08:00
java -Dfile.encoding=UTF-8 -Djava.ext.dirs=./lib ExcelUtils
#java
2023-07-26 17:51:33 +08:00
cd ${BASE_DIR}/ || exit
2023-07-21 18:52:07 +08:00
git pull
2023-07-27 13:55:44 +08:00
mvn clean package
2023-07-27 13:42:53 +08:00
#删除旧文件
rm -rf ${BASE_DIR}/gm/*
2023-07-27 14:17:03 +08:00
2023-07-27 13:42:53 +08:00
#创建新目录文件
2023-07-27 14:15:48 +08:00
json_dir=${BASE_DIR}/gm/config/jsonconf
mkdir -p ${json_dir}
2023-07-27 14:17:03 +08:00
2023-07-27 13:42:53 +08:00
#复制文件
2023-07-27 14:15:48 +08:00
cp -f ${TABLE_DIR}/miduo_server/conf/server/ItemConfig.txt ${json_dir}/ItemConfig.txt
cp -f ${TABLE_DIR}/miduo_server/conf/server/RechargeCommodityConfig.txt ${json_dir}/RechargeCommodityConfig.txt
cp -f ${BASE_DIR}/conf/jsonconf/Reason.txt ${json_dir}/Reason.txt
cp -f ${BASE_DIR}/target/gm_tw_admin-1.0-SNAPSHOT.jar ${BASE_DIR}/gm/gm_tw_admin-1.0-SNAPSHOT.jar
cp -rf ${BASE_DIR}/conf/script ${BASE_DIR}/gm/config
mv ${BASE_DIR}/gm/config/script/gm_reboot.sh ${BASE_DIR}/gm/gm_reboot.sh
2023-07-27 13:42:53 +08:00
#打包
cd ${BASE_DIR}/gm || exit
tar -czvf gm.tar.gz ./*