diff --git a/build-scripts/homeassistant/create_homeassistant.sh b/build-scripts/homeassistant/create_homeassistant.sh index 7d4e92a40..c8968dd21 100755 --- a/build-scripts/homeassistant/create_homeassistant.sh +++ b/build-scripts/homeassistant/create_homeassistant.sh @@ -37,7 +37,8 @@ BASE_IMAGE="resin\/${MACHINE}-alpine-python:3.6" DOCKER_TAG=$1 DOCKER_IMAGE=${MACHINE}-homeassistant BUILD_DIR=${BUILD_DIR:=$SCRIPTPATH} -WORKSPACE=${BUILD_DIR:=$SCRIPTPATH}/hass +WORKSPACE=${BUILD_DIR}/hass +HASS_GIT=${BUILD_DIR}/hass_git # setup docker echo "[INFO] Setup docker for homeassistant" @@ -50,6 +51,10 @@ cp ../../homeassistant/Dockerfile $WORKSPACE/Dockerfile sed -i "s/%%BASE_IMAGE%%/${BASE_IMAGE}/g" $WORKSPACE/Dockerfile sed -i "s/%%HASS_VERSION%%/${HASS_VERS}/g" $WORKSPACE/Dockerfile +git https://github.com/home-assistant/home-assistant $HASS_GIT +cd $HASS_GIT && git checkout $HASS_VERS +cp $HASS_GIT/requirements.txt $WORKSPACE/ + # Run build echo "[INFO] start docker build" docker stop $BUILD_CONTAINER_NAME 2> /dev/null || true @@ -68,6 +73,7 @@ docker run --rm \ echo "[INFO] cleanup WORKSPACE" cd $BUILD_DIR rm -rf $WORKSPACE +rm -rf $HASS_GIT cleanup exit 0 diff --git a/build-scripts/resinos-build/create_resinos.sh b/build-scripts/resinos-build/create_resinos.sh index adbbdc70a..c48e0ca5b 100755 --- a/build-scripts/resinos-build/create_resinos.sh +++ b/build-scripts/resinos-build/create_resinos.sh @@ -67,6 +67,7 @@ fi echo "[INFO] Inject HassIO yocto layer" cp -fr $HASSIO_ROOT/meta-hassio $WORKSPACE/layers/ +sed -i 's%${TOPDIR}/../layers/meta-resin/meta-resin-common \\%${TOPDIR}/../layers/meta-resin/meta-resin-common \\\n${TOPDIR}/../layers/meta-resin/meta-hassio \\%g' $WORKSPACE/layers/*/conf/samples/bblayers.conf.sample # Additional variables BARYS_ARGUMENTS_VAR="-a HASSIO_SUPERVISOR_TAG=$SUPERVISOR_TAG -a HOMEASSISTANT_REPOSITORY=$HOMEASSISTANT_REPOSITORY -a HASSIO_VERSION=$HASSIO_VERSION"