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.
45 lines
1.0 KiB
Bash
Executable File
45 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# BuildAll.sh
|
|
# Script to build all MCP/LSP services in KNEL-AIMiddleware
|
|
|
|
set -e # Exit on error
|
|
|
|
# Colors for output
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${GREEN}=== KNEL-AIMiddleware Build Script ===${NC}"
|
|
echo ""
|
|
echo "Building all services..."
|
|
echo ""
|
|
|
|
# Change to project directory
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
# Get list of all services from docker-compose.yml
|
|
SERVICES=$(docker compose config --services)
|
|
|
|
# Build each service
|
|
for SERVICE in $SERVICES; do
|
|
echo -e "${BLUE}Building: ${SERVICE}${NC}"
|
|
if docker compose build "$SERVICE" 2>&1 | tail -5; then
|
|
echo -e "${GREEN}✓${NC} Successfully built $SERVICE"
|
|
else
|
|
echo -e "${RED}✗${NC} Failed to build $SERVICE"
|
|
echo -e "${YELLOW}Continuing with next service...${NC}"
|
|
fi
|
|
echo ""
|
|
done
|
|
|
|
echo -e "${GREEN}=== Build complete! ===${NC}"
|
|
echo ""
|
|
echo "To start all services:"
|
|
echo " docker compose up -d --profile dev"
|
|
echo ""
|
|
echo "To check status:"
|
|
echo " docker ps"
|