mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-09 04:21:03 +02:00
switch returns
This commit is contained in:
+6
-4
@@ -1474,7 +1474,7 @@ get_latest_github_release() {
|
|||||||
|
|
||||||
if ! github_api_call "https://api.github.com/repos/${repo}/releases/latest" "$temp_file"; then
|
if ! github_api_call "https://api.github.com/repos/${repo}/releases/latest" "$temp_file"; then
|
||||||
rm -f "$temp_file"
|
rm -f "$temp_file"
|
||||||
return 1
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local version
|
local version
|
||||||
@@ -1482,7 +1482,8 @@ get_latest_github_release() {
|
|||||||
rm -f "$temp_file"
|
rm -f "$temp_file"
|
||||||
|
|
||||||
if [[ -z "$version" ]]; then
|
if [[ -z "$version" ]]; then
|
||||||
return 1
|
msg_error "Could not determine latest version for ${repo}"
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$version"
|
echo "$version"
|
||||||
@@ -1499,7 +1500,7 @@ get_latest_codeberg_release() {
|
|||||||
# Codeberg API: get all releases and pick the first non-draft/non-prerelease
|
# Codeberg API: get all releases and pick the first non-draft/non-prerelease
|
||||||
if ! codeberg_api_call "https://codeberg.org/api/v1/repos/${repo}/releases" "$temp_file"; then
|
if ! codeberg_api_call "https://codeberg.org/api/v1/repos/${repo}/releases" "$temp_file"; then
|
||||||
rm -f "$temp_file"
|
rm -f "$temp_file"
|
||||||
return 1
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local version
|
local version
|
||||||
@@ -1513,7 +1514,8 @@ get_latest_codeberg_release() {
|
|||||||
rm -f "$temp_file"
|
rm -f "$temp_file"
|
||||||
|
|
||||||
if [[ -z "$version" ]]; then
|
if [[ -z "$version" ]]; then
|
||||||
return 1
|
msg_error "Could not determine latest version for ${repo}"
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$version"
|
echo "$version"
|
||||||
|
|||||||
Reference in New Issue
Block a user