-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (37 loc) · 1.06 KB
/
Makefile
File metadata and controls
48 lines (37 loc) · 1.06 KB
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
.DEFAULT_GOAL := help
OPEN=$(word 1, $(wildcard /usr/bin/xdg-open /usr/bin/open))
.PHONY: help
help: ## Print the help message
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z_-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
sort | \
column -s ':' -t
.PHONY: clean
clean: ## Clean all generated resources
@git clean -X -d -f
.PHONY: lint
lint: ## Run the linters
@flake8
.PHONY: test
test: ## Run the tests with any python3 interpreter
@tox
.PHONY: docs
docs: ## Build the docs
@$(MAKE) -C docs html
.PHONY: bandit
bandit: ## Run the static code analyzer
@bandit -r flask_fontawesome
.PHONY: all
all: lint bandit docs test ## Run all lints and tests
.PHONY: publish
publish: clean all ## Upload the package to PyPI
@python -m build && \
twine upload dist/*
.PHONY: open-coverage-report
open-coverage-report: ## Open the coverage report in your browser
@$(OPEN) htmlcov/index.html
.PHONY: open-docs
open-docs: ## Open the generated docs in your browser
@$(MAKE) -C docs open
.PHONY: run
run: ## Run the sample app
@./run_example.py