forked from hacs/integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.99 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.DEFAULT_GOAL := help
help: ## Shows help message.
@printf "\033[1m%s\033[36m %s\033[32m %s\033[0m \n\n" "Development environment for" "HACS" "Integration";
@awk 'BEGIN {FS = ":.*##";} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m make %-25s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST);
@echo
init: requirements homeassistant-install## Install requirements
pre-commit install-hooks --config .github/pre-commit-config.yaml;
requirements:
sudo apt update && sudo apt install -y libxml2-dev libxslt-dev bash curl jq libpcap0.8
python3 -m pip --disable-pip-version-check install -U "pip>=8.0.3,<20.3"
python3 -m pip --disable-pip-version-check install -U setuptools wheel
python3 -m pip --disable-pip-version-check install --ignore-installed -r requirements.txt
@bash manage/install_frontend
start: ## Start the HA with the integration
@bash manage/integration_start;
test: ## Run pytest
@python3 -m pytest tests -rxf -x -v -l --cov=./ --cov-report=xml
lint: ## Run linters
set -e
isort .
jq -r -e -c . tests/fixtures/*.json
pre-commit install-hooks --config .github/pre-commit-config.yaml;
pre-commit run --hook-stage manual --all-files --config .github/pre-commit-config.yaml;
bellybutton lint
vulture . --min-confidence 75 --ignore-names policy
coverage: ## Display coverage report
@python3 -m pytest tests -rxf -x -v -l --cov=./ --cov-report=xml > /dev/null
@coverage report --skip-covered
update: ## Pull main from hacs/integration
git pull upstream main;
bump-frontend: ## Bump the HACS frontend
@bash manage/bump_frontend;
homeassistant-install: ## Install the latest dev version of Home Assistant
python3 -m pip --disable-pip-version-check install -U "pip>=8.0.3,<20.3";
python3 -m pip --disable-pip-version-check install -U setuptools wheel;
python3 -m pip --disable-pip-version-check \
install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev;
homeassistant-update: homeassistant-install ## Alias for 'homeassistant-install'