-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (38 loc) · 1.25 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
50
CI := $(if $(CI),yes,no)
SHELL := /bin/bash
ifeq ($(CI), yes)
POETRY_OPTS = "-v"
PRE_COMMIT_OPTS = --show-diff-on-failure --verbose
endif
fix: run-pre-commit ## run all automatic fixes
fix-md: ## automatically fix markdown format errors
@poetry run pre-commit run mdformat --all-files
lint: ## run all linters
@echo "no linters configured for this project"
run-pre-commit: ## run pre-commit for all files
@poetry run pre-commit run $(PRE_COMMIT_OPTS) \
--all-files \
--color always
setup: setup-poetry setup-pre-commit setup-npm ## setup dev environment
setup-npm: ## install node dependencies with npm
@npm ci
setup-poetry: ## setup python virtual environment
@poetry check
@poetry install $(POETRY_OPTS) --sync
setup-pre-commit: ## install pre-commit git hooks
@poetry run pre-commit install
spellcheck: ## run cspell
@echo "Running cSpell to checking spelling..."
@npm exec --no -- cspell lint . \
--color \
--config .vscode/cspell.json \
--dot \
--gitignore \
--must-find-files \
--no-progress \
--relative \
--show-context
test: ## run tests
@echo "no tests configured for this project"
update: # manually run repository updater
@poetry run repository-updater --token "${GITHUB_RO_TOKEN}" --repository finleyfamily/hass-repository