-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
85 lines (62 loc) · 1.54 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
current_dir = $(notdir $(shell pwd))
config.env:
cp .env.example .env
##############################
### LOCAL PYTHON COMMANDS ###
#############################
run:
python run.py
test:
pytest
coverage:
pytest --cov=commands
pytest --cov=core --cov-append
pytest --cov=db --cov-append
pytest --cov=bot --cov-append
coverage report
coverage xml
coverage.codacy: coverage
python-codacy-coverage -r coverage.xml -t $$CODACY_PROJECT_TOKEN
flake8:
flake8
pip.install:
pip install -r requirements-dev.txt
##############################
###### DOCKER COMMANDS ######
#############################
docker.build:
docker-compose build
docker.logs:
docker-compose logs -f
docker.up:
docker-compose up -d
docker.down:
docker-compose down
docker.bash:
docker-compose run bot bash
docker.test:
docker-compose run bot pytest
docker.flake8:
docker-compose run bot flake8
docker.bot.stop:
docker stop bot
docker.bot.restart: docker.bot.stop docker.up
docker.volumes.remove: docker.down
docker volume rm $(current_dir)_mongo_volume
##############################
###### HEROKU COMMANDS ######
#############################
heroku.prod.add_remote:
heroku git:remote -a jerimumhsbot
git remote rename heroku heroku-prod
heroku.prod.deploy:
git push heroku-prod master
heroku.prod.purge_cache:
heroku repo:purge_cache -a jerimumhsbot
heroku.dev.add_remote:
heroku git:remote -a jerimumhstestbot
git remote rename heroku heroku-dev
heroku.dev.deploy:
git push heroku-dev dev:master
heroku.dev.purge_cache:
heroku repo:purge_cache -a jerimumhstestbot