升级安装脚本

This commit is contained in:
2026-04-12 03:24:01 +08:00
parent 257cccd463
commit f1474baa18
+3 -1
View File
@@ -12,8 +12,10 @@ LOG_PATH="/var/log/$APP_NAME"
# 检测是否在工程目录内 # 检测是否在工程目录内
if [ -d ".git" ] && [ -f "main.go" ]; then if [ -d ".git" ] && [ -f "main.go" ]; then
echo "==> 检测到工程目录,直接使用当前代码" echo "==> 检测到工程目录,更新代码..."
PROJECT_DIR="$(pwd)" PROJECT_DIR="$(pwd)"
git pull origin master
git submodule update --init --recursive
else else
echo "==> 拉取工程代码..." echo "==> 拉取工程代码..."
cd /opt cd /opt