Skip to content

Commit e56aa1e

Browse files
💻 1.2.3.RELEASE CentOS快速安装项目运行环境,快速构建/运维部署/启动项目
1 parent dedfcf7 commit e56aa1e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

deploy/deploy.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
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
4548
fi
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+
4858
cp spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
4959

5060
# 5. 运行spring-boot-plus

src/bin/startup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ LOG_BACK_DIR="${LOG_DIR}/back/"
5757
LOG_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
# 启动日志
6464
STARTUP_LOG="================================================ ${NOW_PRETTY} ================================================\n"

0 commit comments

Comments
 (0)