From 014cb3bd1ec48f7d7fa3e8b99a9dd35696d2c6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E=C2=B7De?= Date: Wed, 13 Apr 2022 12:46:32 +0800 Subject: [PATCH] Update deploy.sh --- deploy.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index eee2b782..54dcd4ac 100644 --- a/deploy.sh +++ b/deploy.sh @@ -2,6 +2,12 @@ #该脚本为私有化脚本,打包成内含网页的product-report-starter放在内网私服 +echo 'choose deploy type [1/2]' +echo '1:deploy snapshot' +echo '2:deploy release' +read choose + + #判断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; } @@ -27,8 +33,13 @@ mv $BuildDir/report-ui/dist/* $BuildDir/report-core/src/main/resources/static/ echo "build springboot" cd $BuildDir/report-core -mvn clean deploy -DskipTests -DaltDeploymentRepository=nexus-snapshots::default::http://10.108.10.53:8081/repository/maven-snapshots +if [ $choose = '2' ]; then + mvn clean deploy -DskipTests -DaltDeploymentRepository=nexus-releases::default::http://10.108.10.53:8081/repository/maven-releases +else + mvn clean deploy -DskipTests -DaltDeploymentRepository=nexus-snapshots::default::http://10.108.10.53:8081/repository/maven-snapshots +fi + rm -rf $BuildDir/report-core/src/main/resources/static git reset --hard \ No newline at end of file