-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (28 loc) · 1.01 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
CWD := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PATH := $(HOME)/.local/bin:$(CWD)/bin:$(PATH)
SHELL := /usr/bin/env bash -e -u -o pipefail
help:
@grep -E '^[a-zA-Z1-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort \
| awk 'BEGIN { FS = ":.*?## " }; { printf "\033[36m%-30s\033[0m %s\n", $$1, $$2 }'
install: ## Install all the things
@if [[ -z $CI ]]; then \
pip3 install --user -r requirements.txt; \
else \
pip3 install -r requirements.txt; \
fi
pre-commit: ## Run pre-commit tests
$(info --> Run pre-commit)
@pre-commit run --all-files
shellcheck: ## Run shellcheck on /scripts directory
$(info --> Run shellsheck)
find install.d -type f \
| xargs -n 1 -P 1 -I % shellcheck %
test: ## Run tests suite
$(MAKE) pre-commit
docker build -t bdossantos/home-assistant .
docker run \
-v "${PWD}/homeassistant:/config" \
-v '${PWD}/homeassistant/secrets.yaml.dist:/config/secrets.yaml:ro' \
bdossantos/home-assistant:latest \
python -m homeassistant --config /config --script check_config