优化代码结构
This commit is contained in:
1 parent
8c7a9040d2
commit
cbcd6b4c7f
97 files changed
+4350
-1183
No files matched your search
+12
-6
@@ -29,15 +29,21 @@ if [ ! -f ".env" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "artifacts/server/app.jar" ]; then
|
||||
echo "未找到后端产物: deploy/artifacts/server/app.jar" >&2
|
||||
echo "请先上传已编译好的 Spring Boot 可执行 jar,并命名为 app.jar。" >&2
|
||||
# 如果 artifacts 文件夹被直接复制到了项目根目录(上级目录),而 deploy 目录下尚未存在,则自动复制或链接过来
|
||||
if [ ! -d "artifacts" ] && [ -d "../artifacts" ]; then
|
||||
echo "检测到项目根目录下存在 artifacts 目录,正在同步至 deploy/artifacts..."
|
||||
cp -r ../artifacts ./artifacts
|
||||
fi
|
||||
|
||||
if [ ! -f "artifacts/server/baby-tracker-server-0.1.0.jar" ]; then
|
||||
echo "未找到后端产物: artifacts/server/baby-tracker-server-0.1.0.jar" >&2
|
||||
echo "请先完成后端编译并复制 artifacts 文件夹到当前部署目录。" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "artifacts/web/dist/index.html" ]; then
|
||||
echo "未找到前端产物: deploy/artifacts/web/dist/index.html" >&2
|
||||
echo "请先上传前端 dist 目录到 deploy/artifacts/web/dist。" >&2
|
||||
if [ ! -f "artifacts/web/index.html" ]; then
|
||||
echo "未找到前端产物: artifacts/web/index.html" >&2
|
||||
echo "请先完成前端编译并复制 artifacts 文件夹到当前部署目录。" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user