mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 12:01:25 +00:00
Fix and improve update_available logic for all plugins (#47)
This commit is contained in:
parent
b5a32fe006
commit
abd81ec1c9
6 changed files with 12 additions and 54 deletions
|
@ -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'
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue