# justfile - cross-platform command runner
# Install: winget install Casey.Just (Windows) | brew install just (macOS) | apt install just (Linux)
# Run with: just <recipe>

# Use PowerShell on Windows (just defaults to `sh` which isn't available on Windows)
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

# Run tests with current Python (fast, for development)
test:
    pytest -v

# Run full CI matrix locally (same as GitHub Actions)
test-all:
    tox

# Bump version: 0.0.1 → 0.0.2, creates git tag + commit
bump-patch:
    python -m bumpversion bump patch

# Bump version: 0.0.1 → 0.1.0
bump-minor:
    python -m bumpversion bump minor

# Bump version: 0.0.1 → 1.0.0
bump-major:
    python -m bumpversion bump major

# Show current version
version:
    python -m bumpversion show current_version

# Build the package
build:
    python -m build

# Clean build artifacts
[unix]
clean:
    rm -rf dist build *.egg-info .tox .pytest_cache __pycache__

[windows]
clean:
    powershell -Command "Remove-Item -Recurse -Force -ErrorAction SilentlyContinue dist, build, *.egg-info, .tox, .pytest_cache"
