Enhance build system and logging configuration
- Add scripts/build.sh to compile binaries into bin/ directory - Move all zerolog setup logic from cmd/server/main.go to pkg/config - Add log level configuration support (trace, debug, info, warn, error, fatal, panic) - Simplify cmd/server/main.go from 57 to 27 lines (53% reduction) - Update .gitignore to use bin/ directory instead of individual files - Document build process and bin directory in AGENTS.md - Maintain backward compatibility with all existing functionality
This commit is contained in:
26
scripts/build.sh
Executable file
26
scripts/build.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
|
||||
echo "✅ Build complete!"
|
||||
echo " Server binary: ./bin/server"
|
||||
echo " Greet binary: ./bin/greet"
|
||||
echo ""
|
||||
echo "💡 To run the server: ./bin/server"
|
||||
echo "💡 To use the greet CLI: ./bin/greet [name]"
|
||||
Reference in New Issue
Block a user