From 8e859ff191558930292e7db6393d1af362087355 Mon Sep 17 00:00:00 2001 From: Ari Date: Sun, 17 Jul 2022 20:46:28 -0400 Subject: [PATCH] using n for docker node versions --- Dockerfile | 3 +-- api/src/hass_config/__init__.py | 5 ++++- docker/bin/build.sh | 9 ++------- docker/bin/prep.sh | 11 ++++------- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77861d3..1ea752f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,7 @@ ENV BUILD_VERSION $BUILD_VERSION # <--- System Wide Dependencies --> ENV LANG C.UTF-8 RUN apt-get update -y && \ - apt-get install -y gcc git build-essential libtool automake && \ - pip install Cython + apt-get install -y gcc git build-essential libtool automake curl # <--- Scripts --> COPY docker/bin /app/bin diff --git a/api/src/hass_config/__init__.py b/api/src/hass_config/__init__.py index dec872a..e903dad 100644 --- a/api/src/hass_config/__init__.py +++ b/api/src/hass_config/__init__.py @@ -10,7 +10,10 @@ def find_hass_config() -> HassConfig: """Try to find HASS config.""" if config("USE_EXAMPLE_REPO", False, cast=bool): print("using USE_EXAMPLE_REPO") - from tests.utils import create_copy_of_example_config, HA_CONFIG3_EXAMPLE + from tests.utils import ( + HA_CONFIG3_EXAMPLE, + create_copy_of_example_config, + ) path = create_copy_of_example_config(HA_CONFIG3_EXAMPLE) print("|-> ", path) diff --git a/docker/bin/build.sh b/docker/bin/build.sh index f67e67c..9afb181 100755 --- a/docker/bin/build.sh +++ b/docker/bin/build.sh @@ -18,12 +18,7 @@ function install_py() { popd } -declare -i err=0 werr=0 -install_py & -install_yarn & -while wait -fn || werr=$?; ((werr != 127)); do - err=$werr -done +install_py +install_yarn echo "DONE BUILD" -exit $err diff --git a/docker/bin/prep.sh b/docker/bin/prep.sh index 24ef962..f8726bd 100755 --- a/docker/bin/prep.sh +++ b/docker/bin/prep.sh @@ -2,6 +2,8 @@ set -e function prep_yarn() { + curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n + bash n lts npm i -g yarn } @@ -9,12 +11,7 @@ function prep_py() { pip install -U wheel setuptools pip Cython } -declare -i err=0 werr=0 -prep_py & -prep_yarn & -while wait -fn || werr=$?; ((werr != 127)); do - err=$werr -done +prep_py +prep_yarn echo "DONE PREP" -exit $err \ No newline at end of file