mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-22 08:24:57 +02:00
Compare commits
2 Commits
node_js_ve
...
add_pin_fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e214d58b3e | ||
|
|
d7d90fc3db |
@@ -2394,11 +2394,12 @@ check_for_gh_release() {
|
|||||||
|
|
||||||
# For pinned versions, query the specific release tag directly
|
# For pinned versions, query the specific release tag directly
|
||||||
if [[ -n "$pinned_version_in" ]]; then
|
if [[ -n "$pinned_version_in" ]]; then
|
||||||
|
local pinned_version_encoded="${pinned_version_in//\//%2F}"
|
||||||
http_code=$(curl -sSL --max-time 20 -w "%{http_code}" -o /tmp/gh_check.json \
|
http_code=$(curl -sSL --max-time 20 -w "%{http_code}" -o /tmp/gh_check.json \
|
||||||
-H 'Accept: application/vnd.github+json' \
|
-H 'Accept: application/vnd.github+json' \
|
||||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||||
"${header_args[@]}" \
|
"${header_args[@]}" \
|
||||||
"https://api.github.com/repos/${source}/releases/tags/${pinned_version_in}" 2>/dev/null) || true
|
"https://api.github.com/repos/${source}/releases/tags/${pinned_version_encoded}" 2>/dev/null) || true
|
||||||
|
|
||||||
if [[ "$http_code" == "200" ]] && [[ -s /tmp/gh_check.json ]]; then
|
if [[ "$http_code" == "200" ]] && [[ -s /tmp/gh_check.json ]]; then
|
||||||
releases_json="[$(</tmp/gh_check.json)]"
|
releases_json="[$(</tmp/gh_check.json)]"
|
||||||
@@ -2520,11 +2521,19 @@ check_for_gh_release() {
|
|||||||
rm -f "${legacy_files[0]}"
|
rm -f "${legacy_files[0]}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
current="${current#v}"
|
if [[ "$current" =~ ^v[0-9] ]]; then
|
||||||
|
current="${current:1}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Pinned version handling
|
# Pinned version handling
|
||||||
if [[ -n "$pinned_version_in" ]]; then
|
if [[ -n "$pinned_version_in" ]]; then
|
||||||
local pin_clean="${pinned_version_in#v}"
|
local pin_clean
|
||||||
|
if [[ "$pinned_version_in" =~ ^v[0-9] ]]; then
|
||||||
|
pin_clean="${pinned_version_in:1}"
|
||||||
|
else
|
||||||
|
pin_clean="$pinned_version_in"
|
||||||
|
fi
|
||||||
local match_raw=""
|
local match_raw=""
|
||||||
for i in "${!clean_tags[@]}"; do
|
for i in "${!clean_tags[@]}"; do
|
||||||
if [[ "${clean_tags[$i]}" == "$pin_clean" ]]; then
|
if [[ "${clean_tags[$i]}" == "$pin_clean" ]]; then
|
||||||
@@ -2562,7 +2571,6 @@ check_for_gh_release() {
|
|||||||
msg_ok "No update available: ${app} (${latest_clean})"
|
msg_ok "No update available: ${app} (${latest_clean})"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Checks for new Codeberg release (latest tag).
|
# Checks for new Codeberg release (latest tag).
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user