forked from ByCodersTec/desafio-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (54 loc) · 1.66 KB
/
Makefile
File metadata and controls
73 lines (54 loc) · 1.66 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
install:
# Instala uma nova dependência
docker-compose exec web pip3 install ${package}
remove:
# Remove um pacote
docker-compose exec web pip3 uninstall ${package}
requirements:
# Verifica todas as dependências
docker-compose exec web pip3 freeze
bash:
# Entrar dentro do container
docker-compose exec web bash
logs:
# Visualiza os logs
docker-compose logs -ft web
# DATABASE -----------------------------------------------------
migrations:
# Cria todas as migrações
docker-compose exec web python3 manage.py makemigrations
migrate:
# Rodas as migrações no banco de dados
docker-compose exec web python3 manage.py migrate
show_migrations:
# Mostra todas as migrações de um app
docker-compose exec web python3 manage.py showmigrations ${app}
undo_migrate:
# Reverter uma ou mais migrações
docker-compose exec web python3 manage.py migrate ${app} ${migration}
fix_migrations:
# Arrumar migrações
docker-compose exec web python3 manage.py makemigrations --merge
shell:
# Roda o shell do django
docker-compose exec web python3 manage.py shell
dbshell:
# Entrar no database do banco de dados
docker-compose exec web python3 manage.py dbshell
superuser:
# Cria um superusuário
docker-compose exec web python3 manage.py createsuperuser
# QUALITY -----------------------------------------------------
path := apps
flake8:
# Roda o flake8
docker-compose exec web flake8 . --count
test:
# Roda todos os testes
docker-compose exec web coverage run --source='.' manage.py test ${path} --keepdb
report:
# Gera o relatório de testes
docker-compose exec web coverage report
html:
# Gera o relatório em html
docker-compose exec web coverage html