From 58ffb64421ea968ce550c7b5d5fceca0fe16a049 Mon Sep 17 00:00:00 2001 From: qianming Date: Tue, 11 Apr 2023 13:59:35 +0800 Subject: [PATCH] =?UTF-8?q?update--=E8=84=9A=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 24 ++++++++++++++-------- report-core/src/main/assembly/bin/start.sh | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/build.sh b/build.sh index bf4485eb..aa555b3a 100644 --- a/build.sh +++ b/build.sh @@ -1,27 +1,33 @@ #!/bin/bash -#判断node.js mvn是否存在 -command -v npm >/dev/null 2>&1 || { echo >&2 "I require node.js v14.16.0+ but it's not installed. Aborting."; sleep 5; exit 1; } -command -v mvn >/dev/null 2>&1 || { echo >&2 "I require maven 3.5 + but it's not installed. Aborting."; sleep 5; exit 1; } +echo "判断node.js mvn是否存在" +command -v npm || { echo >&2 "I require node.js v14.16.0+ but it's not installed. Aborting."; sleep 5; exit 1; } +command -v mvn || { echo >&2 "I require maven 3.5 + but it's not installed. Aborting."; sleep 5; exit 1; } cd `dirname $0` BuildDir=`pwd` #工程根目录 echo "build web" cd $BuildDir/report-ui -npm install >/dev/null 2>&1 -npm run build:prod >/dev/null 2>&1 +echo "npm install" +npm install +echo "" +echo "npm run build" +npm run build:prod echo "publish web to springboot src/main/resources/static" mkdir -p $BuildDir/report-core/src/main/resources/static mv $BuildDir/report-ui/dist/* $BuildDir/report-core/src/main/resources/static/ - +echo "" echo "build springboot" cd $BuildDir/report-core -mvn clean >/dev/null 2>&1 -mvn package -Dmaven.test.skip=true >/dev/null 2>&1 +echo "mvn clean" +mvn clean +echo "" +echo "mvn package" +mvn package -Dmaven.test.skip=true echo "zip finish in build dir" if [ ! -d "$BuildDir/build" ]; then @@ -29,4 +35,4 @@ if [ ! -d "$BuildDir/build" ]; then fi mv $BuildDir/report-core/target/aj-report-*.zip $BuildDir/build/ rm -rf $BuildDir/report-core/src/main/resources/static/* - +echo "Finish" diff --git a/report-core/src/main/assembly/bin/start.sh b/report-core/src/main/assembly/bin/start.sh index b39f1c41..6287380c 100755 --- a/report-core/src/main/assembly/bin/start.sh +++ b/report-core/src/main/assembly/bin/start.sh @@ -23,4 +23,4 @@ fi JAVA_OPTS=" -server -Xms1g -Xmx2g -Xmn256m -XX:PermSize=128m -Xss256k " nohup java $JAVA_OPTS -Xbootclasspath/a:$LIB_JARS -jar -Dspring.config.location=$CONF_DIR/bootstrap.yml $LIB_DIR/aj-report-*.jar >/dev/null 2>&1 & -echo "AJ-Report 正在后台执行,请查看aj-report.log日志(tail -F ../logs/aj-report.log),确定软件运行情况" +echo "AJ-Report 正在后台执行,请查看aj-report.log日志(${DEPLOY_DIR}/logs/aj-report.log),确定软件运行情况"