Change path for codespaces (#9484)

This commit is contained in:
Joakim Sørensen 2021-06-30 15:58:01 +02:00 committed by GitHub
parent f5dcf0b760
commit be29828454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,12 +9,6 @@ if [ -z "${DEVCONTAINER}" ]; then
exit 1 exit 1
fi fi
if [ ! -z "${CODESPACES}" ]; then
WORKSPACE="/root/workspace/frontend"
else
WORKSPACE="/workspaces/frontend"
fi
if [ -z $(which hass) ]; then if [ -z $(which hass) ]; then
echo "Installing Home Asstant core from dev." echo "Installing Home Asstant core from dev."
python3 -m pip install --upgrade \ python3 -m pip install --upgrade \
@ -22,9 +16,9 @@ if [ -z $(which hass) ]; then
git+git://github.com/home-assistant/home-assistant.git@dev git+git://github.com/home-assistant/home-assistant.git@dev
fi fi
if [ ! -d "${WORKSPACE}/config" ]; then if [ ! -d "/workspaces/frontend/config" ]; then
echo "Creating default configuration." echo "Creating default configuration."
mkdir -p "${WORKSPACE}/config"; mkdir -p "/workspaces/frontend/config";
hass --script ensure_config -c config hass --script ensure_config -c config
echo "demo: echo "demo:
@ -32,24 +26,24 @@ logger:
default: info default: info
logs: logs:
homeassistant.components.frontend: debug homeassistant.components.frontend: debug
" >> "${WORKSPACE}/config/configuration.yaml" " >> /workspaces/frontend/config/configuration.yaml
if [ ! -z "${HASSIO}" ]; then if [ ! -z "${HASSIO}" ]; then
echo " echo "
# frontend: # frontend:
# development_repo: ${WORKSPACE} # development_repo: /workspaces/frontend
hassio: hassio:
development_repo: ${WORKSPACE}" >> "${WORKSPACE}/config/configuration.yaml" development_repo: /workspaces/frontend" >> /workspaces/frontend/config/configuration.yaml
else else
echo " echo "
frontend: frontend:
development_repo: ${WORKSPACE} development_repo: /workspaces/frontend
# hassio: # hassio:
# development_repo: ${WORKSPACE}" >> "${WORKSPACE}/config/configuration.yaml" # development_repo: /workspaces/frontend" >> /workspaces/frontend/config/configuration.yaml
fi fi
fi fi
hass -c "${WORKSPACE}/config" hass -c /workspaces/frontend/config