forcejo: fix bad if statement

This commit is contained in:
Antoine Martin 2024-10-31 15:45:21 -04:00
parent 4953c4c159
commit 637a92578a
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -14,7 +14,7 @@ echo "Found $(printf '%s\n' $owned_by_you | wc -l ) packages owned by you"
rm -f out_of_date not_in_anitya rm -f out_of_date not_in_anitya
for pkg in $owned_by_you; do for pkg in $owned_by_you; do
if $CHECK_LATEST; then if [ $CHECK_LATEST -eq 1 ]; then
upstream_version=$(curl --fail -X GET -sS -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/packages/?name=$pkg&distribution=Alpine" | jq -r '.items.[].version') upstream_version=$(curl --fail -X GET -sS -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/packages/?name=$pkg&distribution=Alpine" | jq -r '.items.[].version')
else else
upstream_version=$(curl --fail -X GET -sS -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/packages/?name=$pkg&distribution=Alpine" | jq -r '.items.[].stable_version') upstream_version=$(curl --fail -X GET -sS -H 'Content-Type: application/json' "https://release-monitoring.org/api/v2/packages/?name=$pkg&distribution=Alpine" | jq -r '.items.[].stable_version')