builder.braak.pro/Makefile
Bart van der Braak 135cfccd41
Some checks failed
Run checks / checks (pull_request) Failing after 8s
Setup python and make
2024-11-19 20:34:18 +01:00

22 lines
No EOL
666 B
Makefile

.PHONY: venv setup check
help: ## Display this help message
@echo "Usage:"
@echo " make <target>"
@echo ""
@echo "Targets:"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
setup: ## Create Python virtualenv and install dependencies
@if [ ! -f .env ]; then cp .env.example .env; fi
@if [ ! -d .venv ]; then python3 -m venv .venv; fi
@if [ -d .venv ]; then . .venv/bin/activate && pip3 install -r requirements.txt; fi
check: ## Check linting, formatting and types
ruff check
ruff format --check
mypy config/master.cfg
format: ## Autofix linting and formatting issues
ruff check --fix
ruff format