check_config: Version 3.3.0 (#1263)

This commit is contained in:
Franck Nijhof
2020-04-30 23:42:12 +02:00
committed by GitHub
parent d3b7ffd21a
commit 1b29439008
5 changed files with 30 additions and 13 deletions

View File

@@ -1,5 +1,15 @@
# Changelog
## 3.3.0
- Update base image to version 7.2.0
- Add access to `share` folder for when using `whitelist_external_dirs`
- Fixes `fatal: unable to control: supervisor not listening`
- Show only top of the error log in add-on output
- Write full check config output to `/share/check_config.txt`
- Ensure service script does not crash when check config fails
- Hide pip version warning to avoid confusion
## 3.2.0
- Update base image to version 7.1.0

View File

@@ -1,9 +1,9 @@
{
"build_from": {
"aarch64": "homeassistant/aarch64-homeassistant-base:7.1.0",
"amd64": "homeassistant/amd64-homeassistant-base:7.1.0",
"armhf": "homeassistant/armhf-homeassistant-base:7.1.0",
"armv7": "homeassistant/armv7-homeassistant-base:7.1.0",
"i386": "homeassistant/i386-homeassistant-base:7.1.0"
"aarch64": "homeassistant/aarch64-homeassistant-base:7.2.0",
"amd64": "homeassistant/amd64-homeassistant-base:7.2.0",
"armhf": "homeassistant/armhf-homeassistant-base:7.2.0",
"armv7": "homeassistant/armv7-homeassistant-base:7.2.0",
"i386": "homeassistant/i386-homeassistant-base:7.2.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "Check Home Assistant configuration",
"version": "3.2.0",
"version": "3.3.0",
"slug": "check_config",
"description": "Check current Home Assistant configuration against a new version",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/check_config",
@@ -9,7 +9,7 @@
"startup": "once",
"boot": "manual",
"init": false,
"map": ["config", "ssl"],
"map": ["config", "ssl", "share:rw"],
"options": {
"version": "latest"
},

View File

@@ -2,4 +2,4 @@
# ==============================================================================
# Take down the S6 supervision tree when config check is done
# ==============================================================================
s6-svscanctl -t /var/run/s6/services
s6-svscanctl -t /var/run/s6/services

View File

@@ -19,7 +19,7 @@ bashio::log.info "Installing Home Assistant: ${VERSION}..."
bashio::log.info "Please be patient, this might take a few minutes..."
# Install Home Assistant with the requested version
if ! PIP_OUTPUT="$(pip3 install --find-links "${WHEELS_LINKS}" "${CMD}")"; then
if ! PIP_OUTPUT="$(pip3 install --disable-pip-version-check --find-links "${WHEELS_LINKS}" "${CMD}")"; then
bashio::log.error "An error occurred while installing Home Assistant:"
bashio::log "${PIP_OUTPUT}"
bashio::exit.nok
@@ -33,20 +33,27 @@ cp -fr /config /tmp/config
# Start configuration check
bashio::log.info "Checking your configuration against this version..."
if ! HASS_OUTPUT="$(hass -c /tmp/config --script check_config)"; then
if ! hass -c /tmp/config --script check_config > /share/check_config.txt; then
# The configuration check exited with an error
bashio::log.error "The configuration check did not pass!"
bashio::log.error "See the output below for more details."
bashio::log "${HASS_OUTPUT}"
grep -v homeassistant.util.package /share/check_config.txt | head -n 15
bashio::log.info "The full output has been written to /share/check_config.txt"
bashio::exit.nok
fi
# Scan configuration check output for occurrences of "ERROR"
if echo "${HASS_OUTPUT}" | grep -i ERROR > /dev/null; then
if grep -i ERROR /share/check_config.txt > /dev/null; then
# An "ERROR" occurrence has been found, exit with an error
bashio::log.error "Found an error in the log output of the check!"
bashio::log.error "See the output below for more details."
bashio::log "${HASS_OUTPUT}"
grep -i ERROR /share/check_config.txt
bashio::log.info "The full output has been written to /share/check_config.txt"
bashio::exit.nok
fi