1 Star 0 Fork 181

RFst/AJ-Appsp

forked from anji-plus/AJ-Appsp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 1013 Bytes
一键复制 编辑 原始数据 按行查看 历史
Raod 提交于 2021-08-17 16:39 . build
#!/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; }
cd `dirname $0`
BuildDir=`pwd` #工程根目录
echo $BuildDir
echo "build web"
cd $BuildDir/web
npm install >/dev/null 2>&1
npm run build:prod >/dev/null 2>&1
echo "publish web to springboot src/main/resources/static"
mkdir -p $BuildDir/java/sp-app/src/main/resources/static
mv $BuildDir/web/dist/* $BuildDir/java/sp-app/src/main/resources/static/
echo "build springboot"
cd $BuildDir/java
mvn clean >/dev/null 2>&1
mvn package -Dmaven.test.skip=true -Dfile.encoding=UTF-8 >/dev/null 2>&1
echo "zip finish in build dir"
if [ ! -d "$BuildDir/build" ]; then
mkdir $BuildDir/build
fi
mv $BuildDir/java/sp-app/target/sp-app-*.zip $BuildDir/build/
rm -rf $BuildDir/java/sp-app/src/main/resources/static/*;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/RiseZero/appsp.git
git@gitee.com:RiseZero/appsp.git
RiseZero
appsp
AJ-Appsp
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385