Files
DnD-Sidecar/makefile
Fundor333 bc0c7c9237 Start it
2026-03-30 22:27:44 +02:00

45 lines
1.2 KiB
Makefile

SHELL := /bin/bash
RUNNER := uv run --env-file=.env
PY := python manage.py
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: install
install: ## Make venv and install requirements
@uv sync
@$(RUNNER) pre-commit install
@pre-commit autoupdate
migrate: ## Make and run migrations
@$(RUNNER) $(PY) makemigrations
@$(RUNNER) $(PY) migrate
@$(RUNNER) $(PY) collectstatic --noinput
.PHONY: test
test: ## Run tests
@$(RUNNER) skjold -v audit uv.lock
@$(RUNNER) $(PY) test --verbosity=0 --parallel --failfast
.PHONY: run
run: ## Run the Django server
@$(RUNNER) $(PY) runserver
start: install migrate run ## Install requirements, apply migrations, then start development server
precommit: ## Run pre-commit hooks
@git add . & uv run --env-file=.env pre-commit run --all-files
deploy: ## make the deploy code
@uv export --no-hashes --format requirements-txt > requirements.txt
.PHONY: changelog ## update CHANGELOG.md and amend it on the commit
changelog:
@uv run git-cliff --config pyproject.toml --output CHANGELOG.md
@git add CHANGELOG.md
@git commit --amend --no-edit