45 lines
759 B
Makefile
Raw Normal View History

2024-12-03 13:16:44 +00:00
BIN = ./.venv/bin/
PYTHON = ./.venv/bin/python
PIP = ./.venv/bin/pip
APP_NAME=app
all: install build test
ensure_repo:
-@git init
ensure_env: ensure_repo
-@python3 -m venv .venv
install: ensure_env
$(PIP) install -e .
2024-12-06 19:30:14 +00:00
$(PIP) install git+https://molodetz.nl/retoor/zhurnal.git
2024-12-03 13:16:44 +00:00
format: ensure_env
$(PIP) install shed
. $(BIN)/activate && shed
build: ensure_env
$(MAKE) format
$(PIP) install build
$(PYTHON) -m build
serve: ensure_env
$(BIN)serve --host=0.0.0.0 --port=8888
2024-12-06 19:30:14 +00:00
run: ensure_env
2024-12-03 13:16:44 +00:00
$(BIN)zhurnal "make serve" "make bench"
bench: ensure_env
$(BIN)bench --url=http://127.0.0.1:8888/
cli: ensure_env
$(BIN)cli --url=wss://localhost:8888
test: ensure_env
$(PYTHON) -m unittest $(APP_NAME).tests
2024-12-03 22:25:17 +00:00
repl: ensure_env
$(BIN)repl