fix(fedora): Check whether the link value contains an actual .iso file (#1503)

* fix(fedora): Check whether the link value contains an actual .iso file

Also remove the SHA256 requirement. Fedora provides these for all links
now.
Fixes #1502

* refactor(fedora): Use more concise function to filter out non-ISO files

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
This commit is contained in:
Gordon Schulz 2024-11-08 09:12:41 +01:00 committed by GitHub
parent a09d5128be
commit ec0f276abf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1823,7 +1823,7 @@ function get_fedora() {
# shellcheck disable=SC2086 # shellcheck disable=SC2086
JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and .sha256 != null)') JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and (.link | endswith(".iso")))')
URL=$(echo "${JSON}" | jq -r '.link' | head -n1) URL=$(echo "${JSON}" | jq -r '.link' | head -n1)
HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1) HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1)
echo "${URL} ${HASH}" echo "${URL} ${HASH}"