fix(deploy): fix LATEST_TAG extraction regex and fix bash syntax in install.sh
Release / Build & Release (push) Canceled after 0s
Release / Build & Release (push) Canceled after 0s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user