2024-12-05 06:35:28 +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 .
|
|
|
|
|
|
|
|
format: ensure_env
|
|
|
|
$(PIP) install shed
|
|
|
|
. $(BIN)/activate && shed
|
|
|
|
|
|
|
|
build: ensure_env
|
|
|
|
$(MAKE) format
|
|
|
|
$(PIP) install build
|
|
|
|
$(PYTHON) -m build
|
|
|
|
|
|
|
|
serve: ensure_env
|
|
|
|
$(BIN)mololog.serve --host=0.0.0.0 --port=3016 --db=mololog.db
|
|
|
|
|
|
|
|
test: ensure_env
|
2024-12-05 07:18:01 +00:00
|
|
|
$(PYTHON) test.py
|
2024-12-05 06:35:28 +00:00
|
|
|
|
|
|
|
bench: ensure_env
|
|
|
|
$(BIN)mololog.bench --url=http://localhost:3016
|
|
|
|
|