- New cmd/acb-maps-loader reads all 200 map JSON files from maps/ directory - Transforms map files into database schema format for maps table - Supports INSERT with ON CONFLICT for idempotent updates - Includes tests verifying all 200 maps can be parsed - Updates Makefile with acb-maps-loader and load-maps targets This addresses the plan-gap where maps/ had 200 maps but only 12 were in the database. The index-builder generates maps/index.json from the database, so loading the full map library enables complete map index generation. Closes: bf-4bn3 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49 lines
966 B
Makefile
49 lines
966 B
Makefile
# AI Code Battle Makefile
|
|
|
|
.PHONY: all build test clean map-library load-maps
|
|
|
|
# Default target
|
|
all: build
|
|
|
|
# Build all binaries
|
|
build:
|
|
go build ./...
|
|
|
|
# Run all tests
|
|
test:
|
|
go test ./...
|
|
|
|
# Run tests with verbose output
|
|
test-v:
|
|
go test -v ./...
|
|
|
|
# Run engine tests only
|
|
test-engine:
|
|
go test -v ./engine/...
|
|
|
|
# Build acb-local binary
|
|
acb-local:
|
|
go build -o bin/acb-local ./cmd/acb-local
|
|
|
|
# Build acb-mapgen binary
|
|
acb-mapgen:
|
|
go build -o bin/acb-mapgen ./cmd/acb-mapgen
|
|
|
|
# Generate the map library (50 maps per player count)
|
|
map-library:
|
|
@echo "Generating map library..."
|
|
@./scripts/generate-map-library.sh
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
go clean ./...
|
|
rm -rf bin/
|
|
|
|
# Build acb-maps-loader binary
|
|
acb-maps-loader:
|
|
go build -o bin/acb-maps-loader ./cmd/acb-maps-loader
|
|
|
|
# Load map library into database (requires DATABASE_URL or default postgres connection)
|
|
load-maps: acb-maps-loader
|
|
@echo "Loading map library into database..."
|
|
@./bin/acb-maps-loader
|