1
0
mirror of https://github.com/home-assistant/core.git synced 2025-08-26 13:50:02 +00:00
Files
.devcontainer
.github
.vscode
docs
homeassistant
machine
pylint
rootfs
script
hassfest
scaffold
translations
__init__.py
bootstrap
check_dirty
check_format
countries.py
currencies.py
gen_requirements_all.py
inspect_schemas.py
languages.py
lint
lint_and_test.py
monkeytype
pip_check
run-in-env.sh
server
setup
update
version_bump.py
tests
.core_files.yaml
.coveragerc
.dockerignore
.gitattributes
.gitignore
.hadolint.yaml
.pre-commit-config.yaml
.prettierignore
.readthedocs.yml
.strict-typing
.yamllint
CLA.md
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Dockerfile
Dockerfile.dev
LICENSE.md
MANIFEST.in
README.rst
build.yaml
codecov.yml
mypy.ini
pyproject.toml
requirements.txt
requirements_all.txt
requirements_docs.txt
requirements_test.txt
requirements_test_all.txt
requirements_test_pre_commit.txt
setup.cfg
core/script/setup

40 lines
929 B
Bash
Executable File

#!/usr/bin/env bash
# Setups the repository.
# Stop on errors
set -e
cd "$(dirname "$0")/.."
# Add default vscode settings if not existing
SETTINGS_FILE=./.vscode/settings.json
SETTINGS_TEMPLATE_FILE=./.vscode/settings.default.json
if [ ! -f "$SETTINGS_FILE" ]; then
echo "Copy $SETTINGS_TEMPLATE_FILE to $SETTINGS_FILE."
cp "$SETTINGS_TEMPLATE_FILE" "$SETTINGS_FILE"
fi
mkdir -p config
if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ];then
python3 -m venv venv
source venv/bin/activate
fi
script/bootstrap
pre-commit install
python3 -m pip install -e . --constraint homeassistant/package_constraints.txt --use-deprecated=legacy-resolver
python3 -m script.translations develop --all
hass --script ensure_config -c config
if ! grep -R "logger" config/configuration.yaml >> /dev/null;then
echo "
logger:
default: info
logs:
homeassistant.components.cloud: debug
" >> config/configuration.yaml
fi