-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (34 loc) · 1.61 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
ROOT_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
# ==================================================================================== #
# CLEAN
# ==================================================================================== #
## clean: clean all temporary files generated by this project
.PHONY: clean
clean:
@find $(ROOT_DIR) -name ".DS_Store" -type f -exec rm -r {} +
@find $(ROOT_DIR) -type d -name __pycache__ -exec rm -r {} +
@find $(ROOT_DIR) -type d -name "*.pytest_cache*" -exec rm -r {} +
@find $(ROOT_DIR) -type d -name "*.mypy_cache*" -exec rm -r {} +
# ==================================================================================== #
# TASK
# ==================================================================================== #
## task/check-mypy: runs mypy to check types
.PHONY: task/check-mypy
task/check-mypy:
mypy --install-types --non-interactive --check-untyped-defs $(ROOT_DIR)src/
## task/update-cli-docs: updates the cli docs for new options / flags
.PHONY: task/update-cli-docs
task/update-cli-docs:
@$(ROOT_DIR)/scripts/generate-docs.py > $(ROOT_DIR)/docs/commands.md
## task/update-brewfile: updates the cli docs for new options / flags
.PHONY: task/update-brewfile
task/update-brewfile:
@brew bundle dump --force --file $(ROOT_DIR)/brew/Brewfile