ai-voicebot/check-api-evolution.sh
2025-09-01 20:34:01 -07:00

32 lines
879 B
Bash
Executable File

#!/bin/bash
# Standalone API Evolution Check Script
# This script only checks for API evolution without regenerating types.
# Useful for quick checks during development.
set -e
echo "🔍 API Evolution Check"
echo "======================"
# Change to the project directory
cd "$(dirname "$0")"
# Check if schema file exists
if [ ! -f "client/openapi-schema.json" ]; then
echo "❌ OpenAPI schema not found. Run ./generate-ts-types.sh first."
exit 1
fi
# Check if the frontend container is running
if ! docker compose ps client | grep -q "Up"; then
echo "📋 Starting frontend container..."
docker compose up -d client
fi
echo "📋 Running API evolution check..."
docker compose exec client node check-api-evolution.js
echo ""
echo "💡 To regenerate types and schema: ./generate-ts-types.sh"
echo "💡 To run this check only: ./check-api-evolution.sh"