Files
btcprice/Makefile
T
magnus 6c21f172db
build / build (push) Successful in 2m45s
Show live Bitcoin price in page title
2026-09-15 19:51:55 +02:00

38 lines
871 B
Makefile

-include .env
export
VENV := .venv
UVICORN := $(VENV)/bin/uvicorn
TEST_DEPS := $(VENV)/.test-deps
.PHONY: clean run run-local run-citadel tailwind test venv
venv: $(UVICORN)
$(UVICORN): requirements.txt
python3 -m venv $(VENV)
$(VENV)/bin/pip install --upgrade pip
$(VENV)/bin/pip install -r requirements.txt
clean:
rm -rf __pycache__ app/__pycache__
run: venv
$(UVICORN) app.main:app --host 0.0.0.0 --port 4000 --reload
run-local: venv
BTCDATA_URL=$(BTCDATA_LOCAL_URL) $(UVICORN) app.main:app --host 0.0.0.0 --port 4000 --reload
run-citadel: venv
BTCDATA_URL=$(BTCDATA_URL) $(UVICORN) app.main:app --host 0.0.0.0 --port 4000 --reload
tailwind:
npm run css:watch
$(TEST_DEPS): requirements-dev.txt requirements.txt | venv
$(VENV)/bin/pip install -r requirements-dev.txt
touch $(TEST_DEPS)
test: venv $(TEST_DEPS)
$(VENV)/bin/python -m pytest tests/