ForcePilot/Makefile

39 lines
928 B
Makefile
Raw Normal View History

2026-03-17 19:46:09 +08:00
.PHONY: up down logs lint format format_diff router-tests
PYTEST_ARGS ?=
2026-03-17 19:46:09 +08:00
up:
@if [ ! -f .env ]; then \
echo "Error: .env file not found. Please create it from .env.template"; \
exit 1; \
fi
docker compose up -d
2026-03-17 19:46:09 +08:00
down:
docker compose down
logs:
@docker logs --tail=50 api-dev
@echo "\n\nBranch: $$(git branch --show-current)"
@echo "Commit ID: $$(git rev-parse HEAD)"
@echo "System: $$(uname -a)"
######################
# LINTING AND FORMATTING
######################
lint:
2026-03-19 12:09:17 +08:00
cd backend && uv run ruff check package
cd backend && uv run ruff format --check package
cd backend && uv run ruff check --select I package
format:
2026-03-19 12:09:17 +08:00
cd backend && uv run ruff format package
cd backend && uv run ruff check package --fix
cd backend && uv run ruff check --select I package --fix
2026-03-17 19:46:09 +08:00
docker compose exec -T web pnpm run format
router-tests:
docker compose exec -T api uv run --group test pytest test/api $(PYTEST_ARGS)