Skip to content

Commit

Permalink
Update devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Nov 22, 2023
1 parent 9f577c5 commit 41b065c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
16 changes: 8 additions & 8 deletions .devcontainer/container/helpers/common/homeassistant/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
source /opt/container/helpers/common/paths.sh
mkdir -p /config

if test -f ".devcontainer/configuration.yaml"; then
if test -f "$(workspacePath)config/configuration.yaml"; then
echo "Copy configuration.yaml"
ln -sf "$(workspacePath).devcontainer/configuration.yaml" /config/configuration.yaml || echo ".devcontainer/configuration.yaml are missing"
ln -sf "$(workspacePath)config/configuration.yaml" /config/configuration.yaml || echo "config/configuration.yaml are missing"
fi

if test -f ".devcontainer/ui-lovelace.yaml"; then
if test -f "$(workspacePath)config/ui-lovelace.yaml"; then
echo "Copy ui-lovelace.yaml"
ln -sf "$(workspacePath).devcontainer/ui-lovelace.yaml" /config/ui-lovelace.yaml || echo ""
ln -sf "$(workspacePath)config/ui-lovelace.yaml" /config/ui-lovelace.yaml || echo ""
fi

if test -f ".devcontainer/secrets.yaml"; then
if test -f "$(workspacePath)config/secrets.yaml"; then
echo "Copy secrets.yaml"
ln -sf "$(workspacePath).devcontainer/secrets.yaml" /config/secrets.yaml || echo ""
ln -sf "$(workspacePath)config/secrets.yaml" /config/secrets.yaml || echo ""
fi

if test -d "custom_components"; then
if test -d "$(workspacePath)custom_components"; then
echo "Symlink the custom component directory"

if test -d "custom_components"; then
if test -d "$(workspacePath)custom_components"; then
rm -R /config/custom_components
fi

Expand Down
10 changes: 5 additions & 5 deletions .devcontainer/container/helpers/integration/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
source /opt/container/helpers/common/paths.sh


if test -d "$(GetWorkspaceName).git"; then
echo ".git exsist in $(GetWorkspaceName), existing initializing"
if test -d "$(workspacePath).git"; then
echo ".git exsist in $(workspacePath), existing initializing"
exit 1
fi

Expand All @@ -16,6 +16,6 @@ git clone https://github.com/custom-components/integration-blueprint.git /tmp/in

rm -R /tmp/init/.git
rm -R /tmp/init/.devcontainer
cp -a /tmp/init/. "$(GetWorkspaceName)"
cd "$(GetWorkspaceName)" || exit 1
git init
cp -a /tmp/init/. "$(workspacePath)"
cd "$(workspacePath)" || exit 1
git init
1 change: 0 additions & 1 deletion .devcontainer/install/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

uname -m
printenv

3 changes: 0 additions & 3 deletions .devcontainer/install/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ apt-get install -y --no-install-recommends \
xz-utils \
zlib1g-dev


mkdir -p /config/custom_components

python3 -m pip --disable-pip-version-check install --upgrade \
git+https://github.com/home-assistant/home-assistant.git@dev
python3 -m pip --disable-pip-version-check install --upgrade wheel setuptools
Expand Down
2 changes: 1 addition & 1 deletion config/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ROOT="$( cd "$( dirname "$(readlink -f "$0")" )/.." >/dev/null 2>&1 && pwd )"
GITHUB_TOKEN=$(grep github_token ${ROOT}/secrets.yaml | cut -d' ' -f2)
FILES=$(grep "{GITHUB_TOKEN}" ${ROOT}/requirements.txt | sed "s/{GITHUB_TOKEN}/${GITHUB_TOKEN}/g" | tr "\r\n" " ")

python3 -m pip install --upgrade ${FILES}
[ -z "${FILES}" ] || python3 -m pip install --upgrade ${FILES}

0 comments on commit 41b065c

Please sign in to comment.