diff --git a/scripts/push_registry.sh b/scripts/push_registry.sh index af21c7b..fe42dab 100644 --- a/scripts/push_registry.sh +++ b/scripts/push_registry.sh @@ -8,11 +8,12 @@ # 即可拉取(拉取是 GET 响应,不受请求体积限制影响)。 # # 用法:bash scripts/push_registry.sh [镜像:tag] [版本tag] -# 默认:unicut-src-unicut:latest → :latest + :v1.0.0 +# 默认:unicut-src-unicut:latest → :latest + :v set -euo pipefail IMG="${1:-unicut-src-unicut:latest}" -VERSION_TAG="${2:-v1.0.0}" +DEFAULT_VER="v$(grep -oP '"version":\s*"\K[^"]+' package.json | head -1)" +VERSION_TAG="${2:-${DEFAULT_VER:-v1.0.0}}" REG="192.168.68.19:3200" # 内网 Gitea(绕开公网 nginx) OWNER="jinghui" PKG="unicut"