-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
48 lines (35 loc) · 1.19 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
define USAGE
Tubee, the YouTube subscription dashboard
Commands:
install Install dependencies for local development
build Build docker images
start Start the application for development
test Run coverage unit tests
shell Enter interactive shell for debug
db_migrate Create a new database migration (Run with make db_migrate MESSAGE="message")
db_upgrade Upgrade the database to the latest migration
uninstall Uninstall environment
reinstall Reinstall environment (when Python version is bumped)
endef
export USAGE
help:
@echo "$$USAGE"
install:
pyenv install -s $(shell cat .python-version)
poetry env use $(shell echo $(shell pyenv shell $(shell cat .python-version); pyenv which python))
poetry install
build:
docker compose --file docker-compose.dev.yml build
start:
docker compose --file docker-compose.dev.yml up
test:
poetry run flask test --coverage
shell:
poetry run flask shell
db_migrate:
docker compose --file docker-compose.dev.yml exec tubee flask db migrate -m $(MESSAGE)
db_upgrade:
docker compose --file docker-compose.dev.yml exec tubee flask db upgrade
uninstall:
poetry env remove --all
reinstall: uninstall install build