mirror of
https://gitee.com/anji-plus/report.git
synced 2026-05-20 08:47:18 +08:00
增加打包到私服功能
This commit is contained in:
@@ -158,4 +158,35 @@
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<!--私服上传需以下配置,并注释以上build所有-->
|
||||
<!--从私服下载配置-->
|
||||
<repositories>
|
||||
<!--本地-->
|
||||
<repository>
|
||||
<id>nexus</id>
|
||||
<name>nexus</name>
|
||||
<url>http://10.108.10.53:8081/repository/maven-public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<!--上传到私服配置-->
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>nexus-releases</id>
|
||||
<url>http://10.108.10.53:8081/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>nexus-snapshots</id>
|
||||
<url>http://10.108.10.53:8081/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
|
||||
14
deploy.sh
14
deploy.sh
@@ -1,13 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
#该脚本为私有化脚本,打包成内含网页的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; }
|
||||
@@ -34,12 +27,7 @@ mv $BuildDir/report-ui/dist/* $BuildDir/report-core/src/main/resources/static/
|
||||
echo "build springboot"
|
||||
cd $BuildDir/report-core
|
||||
|
||||
|
||||
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
|
||||
mvn clean deploy -DskipTests
|
||||
|
||||
rm -rf $BuildDir/report-core/src/main/resources/static
|
||||
git reset --hard
|
||||
Reference in New Issue
Block a user