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

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