.DEFAULT_GOAL := help

.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: dev
dev: ## Run in development mode
	uv run python -m better_aws_tags

.PHONY: run
run: ## Run debug script
	uv run python debug_bats.py

.PHONY: test
test: ## Run tests on all Python versions
	uv run --python 3.10 pytest -v
	uv run --python 3.11 pytest -v
	uv run --python 3.12 pytest -v
	uv run --python 3.13 pytest -v

.PHONY: lint
lint: ## Run linter
	uv run ruff check .

.PHONY: fmt
fmt: ## Format code
	uv run ruff format .

.PHONY: check
check: lint test ## Run lint and tests

.PHONY: build
build: ## Build package
	uv build

.PHONY: publish
publish: build ## Publish to PyPI
	uv publish

.PHONY: clean
clean: ## Clean build artifacts
	rm -rf dist/ .venv/ __pycache__/ .pytest_cache/ .ruff_cache/ *.egg-info/
