mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
Fix devcontainer and testing Dockerfile (#962)
* Fix permissions for `scripts/setup` * Add new script * Use script * Update Dockerfile * Rename and clone * Perms * Fix * fi
This commit is contained in:
parent
9eae1501d3
commit
2f31b42cb2
6 changed files with 33 additions and 26 deletions
16
scripts/install_ha
Executable file
16
scripts/install_ha
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
pip install -r core/requirements.txt --use-pep517
|
||||
|
||||
if grep -q 'codecov' core/requirements_test.txt; then
|
||||
# Older HA versions still have `codecov` in `requirements_test.txt`
|
||||
# however it is removed from PyPI, so we cannot install it
|
||||
sed -i '/codecov/d' core/requirements_test.txt
|
||||
fi
|
||||
pip install -r core/requirements_test.txt --use-pep517
|
||||
|
||||
pip install -e core/ --use-pep517
|
||||
pip install ulid-transform # this is in Adaptive-lighting's manifest.json
|
||||
pip install $(python test_dependencies.py) --use-pep517
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
python3 -m pip install --requirement requirements.txt
|
||||
pre-commit install-hooks
|
||||
11
scripts/setup-devcontainer
Executable file
11
scripts/setup-devcontainer
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Clone only if the folder doesn't exist
|
||||
if [[ ! -d "core" ]]; then
|
||||
git clone --depth 1 --branch dev https://github.com/home-assistant/core.git
|
||||
fi
|
||||
|
||||
./scripts/install_ha
|
||||
pre-commit install-hooks
|
||||
Loading…
Add table
Add a link
Reference in a new issue