From 683ec08c054b1649b9a689d74bf307118d1cc84c Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 19 May 2017 21:38:55 +0200 Subject: [PATCH] fix io.hass.version --- build-scripts/homeassistant/create_homeassistant.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-scripts/homeassistant/create_homeassistant.sh b/build-scripts/homeassistant/create_homeassistant.sh index aecbda4..12c24a4 100755 --- a/build-scripts/homeassistant/create_homeassistant.sh +++ b/build-scripts/homeassistant/create_homeassistant.sh @@ -123,16 +123,16 @@ echo "[INFO] load homeassistant" cp ../../homeassistant/Dockerfile "$WORKSPACE/Dockerfile" sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" "$WORKSPACE/Dockerfile" -sed -i "s/%%VERSION%%/${DOCKER_TAG}/g" "$WORKSPACE/Dockerfile" -echo "LABEL io.hass.version=\"$DOCKER_TAG\" io.hass.type=\"homeassistant\" io.hass.machine=\"$MACHINE\"" >> "$WORKSPACE/Dockerfile" -git clone --depth 1 -b "$DOCKER_TAG" https://github.com/home-assistant/home-assistant "$HASS_GIT" > /dev/null +git clone --depth 1 -b "$DOCKER_TAG" https://github.com/home-assistant/home-assistant "$HASS_GIT" > /dev/null 2>&1 DOCKER_TAG="$(python3 "$HASS_GIT/setup.py" -V | sed -e "s:^\(.\...\)\.0$:\1:g" -e "s:^\(.\...\)\.0.dev0$:\1-dev:g")" if [ -z "$DOCKER_TAG" ]; then echo "[ERROR] Can't read homeassistant version!" exit 1 fi + +echo "LABEL io.hass.version=\"$DOCKER_TAG\" io.hass.type=\"homeassistant\" io.hass.machine=\"$MACHINE\"" >> "$WORKSPACE/Dockerfile" echo "[INFO] prepare done for $DOCKER_IMAGE:$DOCKER_TAG" # Run build