File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 2323# date: 2019-9-6
2424# ======================================================================
2525
26+ NOW=$( date --date=' 0 days ago' " +%Y-%m-%d-%H-%M-%S" )
27+ echo " ${NOW} "
28+
2629# 1. 下载或更新spring-boot-plus版本库
2730# 先判断当前目录下是否有spring-boot-plus目录
2831# 如果有,则执行git pull
@@ -45,6 +48,13 @@ if [ -d "spring-boot-plus-server" ]; then
4548fi
4649
4750# 4. 复制spring-boot-plus-server-assembly.tar.gz到项目同级目录下
51+ # 备份之前的server
52+
53+ if [ ! -d " spring-boot-plus-server-back" ]; then
54+ mkdir spring-boot-plus-server-back
55+ fi
56+ mv spring-boot-plus-server spring-boot-plus-server-back/spring-boot-plus-server-back-" ${NOW} "
57+
4858cp spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
4959
5060# 5. 运行spring-boot-plus
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ LOG_BACK_DIR="${LOG_DIR}/back/"
5757LOG_STARTUP_PATH=" ${LOG_DIR} /${APPLICATION} _startup.log"
5858
5959# 当前时间
60- NOW=` date --date=' 0 days ago' " +%Y-%m-%d-%H-%M-%S" `
61- NOW_PRETTY=` date --date=' 0 days ago' " +%Y-%m-%d %H:%M:%S" `
60+ NOW=$( date --date=' 0 days ago' " +%Y-%m-%d-%H-%M-%S" )
61+ NOW_PRETTY=$( date --date=' 0 days ago' " +%Y-%m-%d %H:%M:%S" )
6262
6363# 启动日志
6464STARTUP_LOG=" ================================================ ${NOW_PRETTY} ================================================\n"
You can’t perform that action at this time.
0 commit comments