fix(deploy): fix LATEST_TAG extraction regex and fix bash syntax in install.sh
Release / Build & Release (push) Canceled after 0s

This commit is contained in:
kyaring
2026-09-28 11:28:20 +08:00
parent 09e0996b9d
commit bb6a446cad
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ case "$ARCH" in
esac
info "正在获取最新 Release 版本信息..."
LATEST_TAG=$(curl -fsSL -k "${GITEA_URL}/api/v1/repos/${REPO}/releases/latest" 2>/dev/null | grep '"tag_name":' | head -n1 | sed -E 's/.*"([^"]+)".*/\1/')
LATEST_TAG=$(curl -fsSL -k "${GITEA_URL}/api/v1/repos/${REPO}/releases/latest" 2>/dev/null | grep -o '"tag_name":"[^"]*"' | head -n1 | cut -d'"' -f4)
if [ -z "$LATEST_TAG" ]; then
warn "无法通过 Gitea API 自动获取 Tag,回退至 v1.1.5"
LATEST_TAG="v1.1.5"