2023-01-02 19:03:31 +00:00
|
|
|
all: css migrate
|
|
|
|
|
2023-01-05 20:10:17 +00:00
|
|
|
initialize: npm css migrate sethookdir loadplatforms
|
2023-01-02 19:03:31 +00:00
|
|
|
|
2023-01-19 20:41:31 +00:00
|
|
|
HTMLFILES := $(shell find timetracker/games/templates -type f)
|
2023-01-02 23:13:26 +00:00
|
|
|
|
2023-01-03 11:34:50 +00:00
|
|
|
npm:
|
|
|
|
npm install
|
|
|
|
|
2023-01-19 20:41:31 +00:00
|
|
|
css: input.css
|
|
|
|
npx tailwindcss -i ./input.css -o ./timetracker/games/static/base.css
|
2023-01-02 19:03:31 +00:00
|
|
|
|
|
|
|
css-dev: css
|
2023-01-19 20:41:31 +00:00
|
|
|
npx tailwindcss -i ./input.css -o ./timetracker/games/static/base.css --watch
|
2023-01-02 19:03:31 +00:00
|
|
|
|
|
|
|
makemigrations:
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py makemigrations
|
2023-01-02 19:03:31 +00:00
|
|
|
|
|
|
|
migrate: makemigrations
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py migrate
|
2023-01-02 19:03:31 +00:00
|
|
|
|
2023-01-16 18:49:41 +00:00
|
|
|
dev: migrate
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py runserver
|
2023-01-02 19:03:31 +00:00
|
|
|
|
2023-01-07 20:59:34 +00:00
|
|
|
caddy:
|
|
|
|
caddy run --watch
|
|
|
|
|
2023-01-16 18:49:41 +00:00
|
|
|
dev-prod: migrate collectstatic
|
2023-01-19 20:41:31 +00:00
|
|
|
cd timetracker/; PROD=1 poetry run python -m gunicorn --bind 0.0.0.0:8001 root.asgi:application -k uvicorn.workers.UvicornWorker
|
2023-01-07 20:09:47 +00:00
|
|
|
|
2023-01-19 19:35:25 +00:00
|
|
|
dumpgames:
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py dumpdata --format yaml games --output tracker_fixture.yaml
|
2023-01-02 19:03:31 +00:00
|
|
|
|
|
|
|
loadplatforms:
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py loaddata platforms.yaml
|
2023-01-02 19:03:31 +00:00
|
|
|
|
|
|
|
loadsample:
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py loaddata sample.yaml
|
2023-01-02 23:13:26 +00:00
|
|
|
|
|
|
|
createsuperuser:
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py createsuperuser
|
2023-01-03 21:04:22 +00:00
|
|
|
|
|
|
|
shell:
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py shell
|
2023-01-05 11:19:56 +00:00
|
|
|
|
2023-01-07 20:09:47 +00:00
|
|
|
collectstatic:
|
2023-01-19 20:41:31 +00:00
|
|
|
poetry run python timetracker/manage.py collectstatic --clear --no-input
|
2023-01-07 20:09:47 +00:00
|
|
|
|
2023-01-05 14:18:57 +00:00
|
|
|
poetry.lock: pyproject.toml
|
2023-01-05 11:19:56 +00:00
|
|
|
poetry install
|
|
|
|
|
|
|
|
test: poetry.lock
|
2023-01-05 20:10:17 +00:00
|
|
|
poetry run pytest
|
|
|
|
|
2023-01-07 20:09:47 +00:00
|
|
|
date:
|
2023-01-08 14:48:12 +00:00
|
|
|
poetry run python -c 'import datetime; from zoneinfo import ZoneInfo; print(datetime.datetime.isoformat(datetime.datetime.now(ZoneInfo("Europe/Prague")), timespec="minutes", sep=" "))'
|
2023-01-07 20:09:47 +00:00
|
|
|
|
|
|
|
cleanstatic:
|
2023-01-19 20:41:31 +00:00
|
|
|
rm -r timetracker/static/*
|
2023-01-07 20:09:47 +00:00
|
|
|
|
2023-01-07 20:59:34 +00:00
|
|
|
clean: cleanstatic
|