mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 12:01:25 +00:00
Replace update available logic with property access (#43)
This commit is contained in:
parent
1662ddf17f
commit
4fc9a14155
2 changed files with 6 additions and 28 deletions
19
lib/core.sh
19
lib/core.sh
|
@ -122,22 +122,11 @@ function bashio::core.version_latest() {
|
|||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Checks if there is an update available for the Supervisor.
|
||||
# Checks if there is an update available for Home Assistant.
|
||||
# ------------------------------------------------------------------------------
|
||||
function bashio::supervisor.update_available() {
|
||||
local version
|
||||
local version_latest
|
||||
|
||||
bashio::log.trace "${FUNCNAME[0]}"
|
||||
|
||||
version=$(bashio::core.version)
|
||||
version_latest=$(bashio::core.version_latest)
|
||||
|
||||
if [[ "${version}" = "${version_latest}" ]]; then
|
||||
return "${__BASHIO_EXIT_NOK}"
|
||||
fi
|
||||
|
||||
return "${__BASHIO_EXIT_OK}"
|
||||
function bashio::core.update_available() {
|
||||
bashio::log.trace "${FUNCNAME[0]}" "$@"
|
||||
bashio::cli 'core.info.update_available' '.update_available // false'
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue