Scripts added: - CloneVendorRepos.sh: Clones all 27 vendor MCP/LSP repositories - BuildAll.sh: Builds all services from docker-compose.yml - CleanVendor.sh: Removes all cloned vendor repositories - StatusCheck.sh: Checks build status of all services Makefile added: - Provides convenient targets for common operations - Integrates all shell scripts into make commands - Targets: help, clone-vendors, build-all, clean-vendor, status, test, logs, ps, up, down Note: vendor/ directory remains gitignored (per .gitignore). CloneVendorRepos.sh creates it automatically.
66 lines
1.6 KiB
Bash
Executable File
66 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# StatusCheck.sh
|
|
# Script to check build status of all MCP/LSP services
|
|
|
|
set -e # Exit on error
|
|
|
|
# Colors for output
|
|
GREEN='\033[0;32m'
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${BLUE}=== KNEL-AIMiddleware Service Status Check ===${NC}"
|
|
echo ""
|
|
|
|
# Change to project directory
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
# Get list of all services from docker-compose.yml
|
|
SERVICES=$(docker compose config --services | sort)
|
|
|
|
# Counters
|
|
TOTAL=0
|
|
BUILT=0
|
|
NOT_BUILT=0
|
|
|
|
echo "Checking Docker images for all services..."
|
|
echo ""
|
|
|
|
for SERVICE in $SERVICES; do
|
|
TOTAL=$((TOTAL + 1))
|
|
# Construct expected image name
|
|
IMAGE_NAME="knel-aimiddleware-$SERVICE"
|
|
|
|
# Check if image exists
|
|
if docker images --format '{{.Repository}}' | grep -q "^${IMAGE_NAME}$"; then
|
|
echo -e "${GREEN}✓${NC} $SERVICE (image exists)"
|
|
BUILT=$((BUILT + 1))
|
|
else
|
|
echo -e "${RED}✗${NC} $SERVICE (not built)"
|
|
NOT_BUILT=$((NOT_BUILT + 1))
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo -e "${BLUE}=== Summary ===${NC}"
|
|
echo -e "Total services: $TOTAL"
|
|
echo -e "${GREEN}Built: $BUILT${NC}"
|
|
echo -e "${RED}Not built: $NOT_BUILT${NC}"
|
|
echo ""
|
|
|
|
# Show STATUS.md
|
|
if [ -f "STATUS.md" ]; then
|
|
echo -e "${BLUE}=== STATUS.md Summary ===${NC}"
|
|
grep -c "Built" STATUS.md | xargs -I {} echo -e "${GREEN}Built: {}${NC}"
|
|
grep -c "Pending" STATUS.md | xargs -I {} echo -e "${YELLOW}Pending: {}${NC}"
|
|
echo ""
|
|
fi
|
|
|
|
echo "Next steps:"
|
|
echo " - To build missing services: docker compose build <service-name>"
|
|
echo " - To build all services: ./BuildAll.sh"
|
|
echo " - To view detailed status: cat STATUS.md"
|