Fix and improve update_available logic for all plugins (#47)

This commit is contained in:
Franck Nijhof 2021-01-14 03:41:48 +01:00 committed by GitHub
parent b5a32fe006
commit abd81ec1c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 54 deletions

View file

@ -110,19 +110,8 @@ function bashio::supervisor.version_latest() {
# Checks if there is an update available for the Supervisor.
# ------------------------------------------------------------------------------
function bashio::supervisor.update_available() {
local version
local version_latest
bashio::log.trace "${FUNCNAME[0]}"
version=$(bashio::supervisor.version)
version_latest=$(bashio::supervisor.version_latest)
if [[ "${version}" = "${version_latest}" ]]; then
return "${__BASHIO_EXIT_NOK}"
fi
return "${__BASHIO_EXIT_OK}"
bashio::log.trace "${FUNCNAME[0]}" "$@"
bashio::supervisor 'supervisor.info.update_available' '.update_available // false'
}
# ------------------------------------------------------------------------------