From 23b0d11e574ece766a1dd6426fa0dd372a13070f Mon Sep 17 00:00:00 2001 From: pvizeli Date: Mon, 20 Mar 2017 16:31:54 +0100 Subject: [PATCH] add VERSION to supervisor --- build-scripts/hassio-supervisor/create_all.sh | 15 +++++++++++++++ .../hassio-supervisor/create_hassio_supervisor.sh | 5 ++++- meta-hassio/conf/layer.conf | 6 ++++-- supervisor/Dockerfile | 3 +++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 build-scripts/hassio-supervisor/create_all.sh diff --git a/build-scripts/hassio-supervisor/create_all.sh b/build-scripts/hassio-supervisor/create_all.sh new file mode 100644 index 000000000..81fe5cf89 --- /dev/null +++ b/build-scripts/hassio-supervisor/create_all.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +# Sanity checks +if [ "$#" -ne 1 ]; then + echo "Usage: create_all.sh |NONE" + echo "Optional environment: BUILD_DIR" + exit 1 +fi + +for arch in "armhf" "aarch64" "i386" "amd64" +do + ./create_hassio_supervisor.sh $arch $1 +done diff --git a/build-scripts/hassio-supervisor/create_hassio_supervisor.sh b/build-scripts/hassio-supervisor/create_hassio_supervisor.sh index 5368458dd..f2366f914 100755 --- a/build-scripts/hassio-supervisor/create_hassio_supervisor.sh +++ b/build-scripts/hassio-supervisor/create_hassio_supervisor.sh @@ -47,7 +47,10 @@ echo "[INFO] Setup docker for supervisor" mkdir -p $BUILD_DIR mkdir -p $WORKSPACE -sed "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" ../../supervisor/Dockerfile > $WORKSPACE/Dockerfile + +cp ../../supervisor/Dockerfile $WORKSPACE/Dockerfile +sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" $WORKSPACE/Dockerfile +sed -i "s/%%SUPERVISOR_TAG%%/${DOCKER_TAG}/g" $WORKSPACE/Dockerfile # Run build echo "[INFO] start docker build" diff --git a/meta-hassio/conf/layer.conf b/meta-hassio/conf/layer.conf index 6d9ba4a03..21cf46586 100644 --- a/meta-hassio/conf/layer.conf +++ b/meta-hassio/conf/layer.conf @@ -4,5 +4,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "hassio" -BBFILE_PATTERN_hassio := "^${LAYERDIR}/" -LAYERDEPENDS_hassio := "resin-common" +BBFILE_PATTERN_hassio = "^${LAYERDIR}/" + +LAYERVERSION_hassio = "1" +LAYERDEPENDS_hassio = "resin-common" diff --git a/supervisor/Dockerfile b/supervisor/Dockerfile index 9a7ed4968..459143ac0 100644 --- a/supervisor/Dockerfile +++ b/supervisor/Dockerfile @@ -1,5 +1,8 @@ FROM %%BASE_IMAGE%% +# Add version +ENV VERSION %%SUPERVISOR_TAG%% + # remove several traces of python RUN apk del --no-cache python*