优化标签提取逻辑,移除版本前缀并统一处理,更新相关脚本和配置文件

This commit is contained in:
Ing
2025-12-08 16:06:41 +08:00
parent ce9017bae1
commit cdcceea395
7 changed files with 20 additions and 15 deletions

View File

@@ -71,8 +71,7 @@ while true; do
shift 2
;;
--tag)
TAG="$2"
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
TAG="$(echo "$2" | sed 's/^[v|V]//g')"
shift 2
;;
--img)
@@ -97,8 +96,7 @@ if ! command -v qm >/dev/null 2>&1; then
fi
if [ -z "$TAG" ]; then
TAG="$(curl -skL --connect-timeout 10 -w "%{url_effective}" -o /dev/null "${REPO}/releases/latest" | awk -F'/' '{print $NF}')"
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
TAG="$(curl -skL --connect-timeout 10 -w "%{url_effective}" -o /dev/null "${REPO}/releases/latest" | awk -F'/' '{print $NF}' | sed 's/^[v|V]//g')"
fi
if [ -n "${IMG}" ] && [ -f "${IMG}" ]; then