#!/bin/bash

# DanceLessonsCoach Build Script
# Builds binaries into the bin/ directory

set -e

echo "🔨 Building DanceLessonsCoach binaries..."

# Create bin directory if it doesn't exist
mkdir -p bin

# Build server binary
echo "📦 Building server..."
go build -o bin/server ./cmd/server

# Build greet CLI binary
echo "📦 Building greet CLI..."
go build -o bin/greet ./cmd/greet

# Build new Cobra CLI binary
echo "📦 Building Cobra CLI..."
go build -o bin/dance-lessons-coach ./cmd/cli

echo "✅ Build complete!"
echo "   Server binary:       ./bin/server"
echo "   Greet binary:        ./bin/greet"
echo "   Cobra CLI binary:    ./bin/dance-lessons-coach"
echo ""
echo "💡 To run the server: ./bin/server"
echo "💡 To use the greet CLI: ./bin/greet [name]"
echo "💡 To use the Cobra CLI: ./bin/dance-lessons-coach --help"
