.PHONY: help build run clean test install dev help: ## Show this help message @echo "XML Sitemap Generator API - Make Commands" @echo "" @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' install: ## Install Go dependencies @echo "๐Ÿ“ฆ Installing dependencies..." @go mod download @echo "โœ… Dependencies installed" build: ## Build the application @echo "๐Ÿ”จ Building..." @go build -o sitemap-api . @echo "โœ… Build complete: ./sitemap-api" run: build ## Build and run the application @echo "๐Ÿš€ Starting server on http://localhost:8080" @./sitemap-api dev: ## Run in development mode (with hot reload if air is installed) @if command -v air > /dev/null; then \ air; \ else \ echo "๐Ÿ’ก Tip: Install 'air' for hot reload: go install github.com/cosmtrek/air@latest"; \ $(MAKE) run; \ fi clean: ## Clean build artifacts and database @echo "๐Ÿงน Cleaning..." @rm -f sitemap-api @rm -f *.db @rm -f *.db-journal @echo "โœ… Clean complete" test: ## Run tests @echo "๐Ÿงช Running tests..." @go test -v ./... format: ## Format code @echo "๐Ÿ“ Formatting code..." @go fmt ./... @echo "โœ… Code formatted" lint: ## Run linter (requires golangci-lint) @echo "๐Ÿ” Running linter..." @if command -v golangci-lint > /dev/null; then \ golangci-lint run; \ else \ echo "โŒ golangci-lint not installed. Install: https://golangci-lint.run/usage/install/"; \ fi docker-build: ## Build Docker image @echo "๐Ÿณ Building Docker image..." @docker build -t sitemap-api . @echo "โœ… Docker image built: sitemap-api" docker-run: docker-build ## Run in Docker container @echo "๐Ÿณ Running in Docker..." @docker run -p 8080:8080 sitemap-api