This commit is contained in:
Tomáš Dvořák
2025-10-16 13:32:05 +02:00
commit 12cba639b9
663 changed files with 168914 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
.PHONY: build run test migrate seed clean help
# Default target
help:
@echo "Available targets:"
@echo " build - Build the application"
@echo " run - Run the application locally"
@echo " docker-up - Start the application with Docker"
@echo " docker-down - Stop the Docker containers"
@echo " test - Run tests"
@echo " migrate - Run database migrations"
@echo " seed - Seed the database with test data"
@echo " clean - Clean build artifacts"
# Build the application
build:
go build -o bin/fotbal-club
# Run the application locally
run:
go run main.go
# Start the application with Docker
docker-up:
docker-compose up -d --build
# Stop the Docker containers
docker-down:
docker-compose down
# Run tests
test:
go test -v ./...
# Run database migrations
migrate:
go run main.go migrate
# Seed the database with test data
seed:
go run main.go seed
# Clean build artifacts
clean:
go clean
rm -rf bin/
# Install dependencies
deps:
go mod download
go mod verify
# Format code
fmt:
go fmt ./...
# Lint code
lint:
golangci-lint run
# Run the application in development mode
dev:
docker-compose -f docker-compose.yml up --build