forked from samuel/python-ping
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 1020 Bytes
/
Makefile
File metadata and controls
31 lines (24 loc) · 1020 Bytes
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
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@# credits to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help-more: ## Show more rare commands
@grep -E '^[a-zA-Z_-]+:.*?### .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?### "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
build: export COMPOSE_PROJECT_NAME = ${subst /,_,$(shell pwd)}
build: ## Run pip-compile
bash -c " \
docker-compose build; \
docker-compose down \
"
run-tests: export COMPOSE_PROJECT_NAME = ${subst /,_,$(shell pwd)}
run-tests: ## Run tests locally
bash -c " \
docker-compose run --entrypoint python app -m tests.tests; \
docker-compose down \
"
pip-compile: export COMPOSE_PROJECT_NAME = ${subst /,_,$(shell pwd)}
pip-compile: ## Run pip-compile
bash -c " \
docker-compose run --entrypoint sh app -c 'pip install pip-tools; pip-compile'; \
docker-compose down \
"