-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 1.09 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
51
ENVDIR := env
HEROKU_APP_NAME := tutubo-auth-server
# -- Run scripts
.PHONY: setup
setup:
( test -d $(ENVDIR) || ( \
echo ">>>>>> Crear directorio para venv <<<<<<" && \
python3 -m venv $(ENVDIR) ) \
)
.PHONY: install
install: setup
echo ">>>>>> Install requirements <<<<<<"
. $(ENVDIR)/bin/activate && \
pip3 install -r app/requirements.txt
.PHONY: test
test: setup
. $(ENVDIR)/bin/activate && \
pip3 install -r app/requirements.txt && \
coverage run -m pytest -v app/tests/ --disable-pytest-warnings && \
coverage report -m
# -- Heroku related commands
# You need to be logged in Heroku CLI before doing this
# heroku login
# heroku container:login
.PHONY: heroku-push
heroku-push:
heroku container:push web --recursive --app=$(HEROKU_APP_NAME) --verbose
.PHONY: heroku-release
heroku-release:
heroku container:release web --app $(HEROKU_APP_NAME) --verbose
# -- Utils
.PHONY: ping
ping:
curl -vvv "localhost:3000/ping"
.PHONY: help
help:
@echo 'Usage: make <target>'
@echo ''
@echo 'Available targets are:'
@echo ''
@grep -E '^\.PHONY: *' $(MAKEFILE_LIST) | cut -d' ' -f2- | sort