Update deploy.sh

木子李·De 3 years ago
parent cbea78db43
commit 014cb3bd1e

@ -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
Loading…
Cancel
Save