File tree Expand file tree Collapse file tree 3 files changed +19
-24
lines changed
Expand file tree Collapse file tree 3 files changed +19
-24
lines changed Original file line number Diff line number Diff line change 2323# date: 2019-9-6
2424# ======================================================================
2525
26- # 版本库路径
27- PROJECT_REPO=" https://github.com/geekidea/spring-boot-plus.git"
28- # 项目名称
29- PROJECT_NAME=" spring-boot-plus"
30- # 当前时间
31- NOW=$( date --date=' 0 days ago' " +%Y-%m-%d-%H-%M-%S" )
32- echo " ${NOW} "
33-
3426# 1. 下载或更新spring-boot-plus版本库
3527# 先判断当前目录下是否有spring-boot-plus目录
3628# 如果有,则执行git pull
3729# 如果没有,则clone
38- if [ ! -d " / spring-boot-plus" ]; then
39- git clone ${PROJECT_REPO}
30+ if [ ! -d " spring-boot-plus" ]; then
31+ git clone https://github.com/geekidea/spring-boot-plus.git
4032else
33+ cd spring-boot-plus
4134 git pull
4235fi
4336
4437# 2. maven打包
45- cd $( PROJECT_NAME)
4638mvn clean package -Ptest
4739
4840# 3. 停服
49- # cd到项目源代码同级目录
50- cd ../
51- # 停服
52- sh ${PROJECT_NAME} -server/bin/shutdown.sh
41+ cd ..
42+
43+ if [ -d " spring-boot-plus-server" ]; then
44+ sh spring-boot-plus-server/bin/shutdown.sh
45+ fi
5346
54- # 4. 移动spring-boot-plus-server-assembly.tar.gz到项目同级目录下
55- # 备份上一次的server
56- echo " ${NOW} "
57- mv ${PROJECT_NAME} -server ${PROJECT_NAME} -server-" ${NOW} "
58- # 移动最新打包的server到项目同级目录下
59- mv ${PROJECT_NAME} /target/${PROJECT_NAME} -server-assembly.tar.gz ../../
47+ # 4. 复制spring-boot-plus-server-assembly.tar.gz到项目同级目录下
48+ cp spring-boot-plus/target/spring-boot-plus-server-assembly.tar.gz spring-boot-plus-server-assembly.tar.gz
6049
6150# 5. 运行spring-boot-plus
62- tar -zxvf ${PROJECT_NAME} -server-assembly.tar.gz
63- cd ${PROJECT_NAME} -server/bin
51+ tar -zxvf spring-boot-plus -server-assembly.tar.gz
52+ cd spring-boot-plus -server/bin
6453sh restart.sh
6554
6655# 6. 访问项目
Original file line number Diff line number Diff line change 2222# date: 2019-8-29
2323# ======================================================================
2424
25-
25+ # 下载脚本
2626wget -O install-all.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-all.sh
2727wget -O install-jdk.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-jdk.sh
2828wget -O install-git.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-git.sh
2929wget -O install-maven.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-maven.sh
3030wget -O install-redis.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-redis.sh
3131wget -O install-mysql.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/install-mysql.sh
32+ wget -O mysql_spring_boot_plus.sql https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/db/mysql_spring_boot_plus.sql
3233
34+ # 执行安装所有
3335sh install-all.sh
Original file line number Diff line number Diff line change @@ -63,3 +63,7 @@ mysql -uroot -p${PWD}
6363# 使用新密码登陆
6464# exit
6565# mysql -uroot -pSpringbootplus666!
66+
67+ # 导入spring-boot-plus数据库脚本
68+ # use mysql;
69+ # source /root/mysql_spring_boot_plus.sql;
You can’t perform that action at this time.
0 commit comments