62 Star 86 Fork 9

fastjrun / demo

加入 Gitee
与超过 600 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.sh 1.37 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
fastjrun 提交于 2021-09-14 10:42 . 修复打包脚本
#!/bin/bash
mkdir -p demo-base/src/main/java
echo "build ..."
rm -rf output/*
mkdir -p output
if [ "ci" = $1 ] ; then
mvn clean compile -pl demo-base,demo-bundle -am -Dbdgc.skip=false
elif [ "ut" = $1 ] ; then
mvn clean verify -pl demo-jacoco-report -am -Put -Dbdgc.skip=false
elif [ "package_admin" = $1 ] ; then
cd demo-admin
npm install
npm run build:prod
tar -czf dist.tar.gz ./dist
cp dist.tar.gz ../output
cd ..
elif [ "docker_admin" = $1 ] ; then
cd demo-admin
npm install
npm run build:prod
cp -r dist ../output
cp Dockerfile nginx.conf ../output
cd ../output
docker build . -t fastjrun/demo-admin:3.0.0
cd ..
elif [ "package_server" = $1 ] ; then
mvn clean package -pl demo-server -am -Dbdgc.skip=false
cp demo-server/target/demo-server.jar ./output
elif [ "docker_server" = $1 ] ; then
mvn clean package -pl demo-server -am -Dbdgc.skip=false
cp demo-server/target/demo-server.jar ./output
cp demo-server/Dockerfile ./output
cd output
docker build . -t fastjrun/demo-server:3.0
cd ..
elif [ "package_mock_server" = $1 ] ; then
mvn clean package -pl demo-mock-server -am -Dbdmgc.skip=false
cp demo-mock-server/target/demo-mock-server.jar ./output
elif [ "clean_all" = $1 ] ; then
mvn clean
rm -rf output
rm -rf demo-bundle/src
rm -rf demo-bundle-mock/src
fi
echo "build done."

评论 ( 0 )

你可以在登录后,发表评论

Java
1
https://gitee.com/fastjrun/demo.git
git@gitee.com:fastjrun/demo.git
fastjrun
demo
demo
master

搜索帮助

161121 f78d6d6f 1850385 154831 86f8c370 1850385