tools/update-scan: custom handler for aspnet as release monitoring does handle major release versioning

This commit is contained in:
Rudi Heitbaum 2023-09-01 23:00:46 +00:00
parent 013261ccab
commit dbb762a46a

View File

@ -57,6 +57,20 @@ check_for_update() {
return
fi
upstream_version=""
if [[ "${github_api}" = "yes" ]]; then
case ${PKG_NAME} in
aspnet6-runtime)
upstream_version="$(curl -m 5 -sL ${github_api_token} https://api.github.com/repos/dotnet/runtime/releases | jq -r '[.[] | select(.prerelease==false) | select(.tag_name | match("v6.0")) | .tag_name][0] | sub("v";"")')"
;;
aspnet8-runtime)
upstream_version="$(curl -m 5 -sL ${github_api_token} https://api.github.com/repos/dotnet/runtime/releases | jq -r '[.[] | select(.tag_name | match("v8.0")) | .tag_name][0] | sub("v";"")')"
;;
esac
fi
if [ -z "${upstream_version}" ]; then
# check if package exists at tracker
RMO_API_RESPONSE=$(curl -m 5 -sL "https://release-monitoring.org/api/project/LibreELEC/${PKG_NAME}" || true)
upstream_version=$(echo "${RMO_API_RESPONSE}" | jq -r '.version' || true)
@ -70,6 +84,7 @@ check_for_update() {
upstream_version=${upstream_version//-/.}
;;
esac
fi
# if pkg_version is a githash on github and github api available - always check against latest
if [[ ${PKG_VERSION} =~ ^[a-z0-9]{40} ]] &&