-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
46 lines (33 loc) · 1.17 KB
/
justfile
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
runserver:
#!/bin/bash
transactions_count=$(python manage.py shell -c "from transaction.models import Commission; print(Commission.objects.count())")
whitelistedbanks_count=$(python manage.py shell -c "from transaction.models import WhitelistedBank; print(WhitelistedBank.objects.count())")
if [ "$transactions_count" -eq 0 ] || [ "$whitelistedbanks_count" -eq 0 ]; then
python manage.py loadbanks
python manage.py loadcomissions
fi
python manage.py runserver
migrate:
python manage.py migrate
makemigrations app="":
python manage.py makemigrations {{ app }}
shell:
python manage.py shell
check:
python manage.py check
dockup:
docker compose up
clean:
#!/usr/bin/env bash
find . -name '__pycache__' -not -path "./.venv/*" -prune -exec rm -rf {} \;
find . -name '*.pyc' -not -path "./.venv/*" -exec rm {} \;
find . -name '.DS_Store' -not -path "./.venv/*" -exec rm {} \;
rm -rf .mypy
loadbasics:
python manage.py loadbanks && python manage.py loadcomissions
dockdown:
docker compose down
zip: clean
#!/usr/bin/env bash
rm -f adabank.zip
zip -r adabank.zip . -x .env .venv/* .git/*