-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
36 lines (27 loc) · 1.06 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
.PHONY: distro distro-test clean build upload upload-test test lint help
## building
distro: clean build upload ## build and upload distro to prod pypi
distro-test: clean build upload-test ## build and upload distro to test pypi
clean: ## cleanup all distro
-rm -fr dist
-rm -fr __pycache__
-rm -fr sendria/__pycache__
-rm -fr build
-rm -fr sendria/static/.webassets-cache/ sendria/static/assets/bundle.*
build: ## build distro
webassets -m sendria.build_assets build
python3 setup.py sdist bdist_wheel
-rm -rf sendria/static/.webassets-cache/ sendria/static/assets/bundle.*
upload: ## upload distro
twine upload dist/sendria*
upload-test: ## upload distro to test Pypi
twine upload --repository testpypi dist/sendria*
test: ## run test suite
pytest --nf --ff -q
lint: ## run external tools like flake8, bandit, safety
flake8 sendria
bandit -rq sendria
safety check --bare
.DEFAULT_GOAL := help
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'