mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
tools/update-scan: custom handler for aspnet as release monitoring does handle major release versioning
This commit is contained in:
parent
013261ccab
commit
dbb762a46a
@ -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} ]] &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user