Files
MyClub/Makefile
T
Tomas Dvorak dfc079288f hot fix #1
2026-01-26 08:13:18 +01:00

64 lines
1.2 KiB
Makefile

.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 (MyClub + E-shop if enabled)
docker-up:
@./docker-compose-wrapper.sh 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 (MyClub + E-shop if enabled)
dev:
@./docker-compose-wrapper.sh up --build