85 lines
2.2 KiB
Batchfile
85 lines
2.2 KiB
Batchfile
@echo off
|
|
REM Build All Script for Stock Bot (Batch version)
|
|
REM Builds libraries first, then apps with Turbo, then dashboard with Angular CLI
|
|
|
|
echo 🚀 Starting complete build process...
|
|
|
|
REM Store original directory
|
|
set "ORIGINAL_DIR=%CD%"
|
|
cd /d "g:\repos\stock-bot"
|
|
|
|
REM Step 1: Build libraries first
|
|
echo 📚 Building libraries...
|
|
call powershell ./scripts/build-libs.ps1
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo ❌ Library build failed
|
|
cd /d "%ORIGINAL_DIR%"
|
|
exit /b 1
|
|
)
|
|
|
|
REM Step 2: Build apps with Turbo (excluding dashboard)
|
|
echo 🏗️ Building applications with Turbo...
|
|
|
|
REM Check if each app exists and build individually
|
|
if exist "apps\data-service" (
|
|
echo Building data-service...
|
|
call turbo run build --filter="./apps/data-service"
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo ❌ data-service build failed
|
|
cd /d "%ORIGINAL_DIR%"
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
if exist "apps\execution-service" (
|
|
echo Building execution-service...
|
|
call turbo run build --filter="./apps/execution-service"
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo ❌ execution-service build failed
|
|
cd /d "%ORIGINAL_DIR%"
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
if exist "apps\portfolio-service" (
|
|
echo Building portfolio-service...
|
|
call turbo run build --filter="./apps/portfolio-service"
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo ❌ portfolio-service build failed
|
|
cd /d "%ORIGINAL_DIR%"
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
if exist "apps\processing-service" (
|
|
echo Building processing-service...
|
|
call turbo run build --filter="./apps/processing-service"
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo ❌ processing-service build failed
|
|
cd /d "%ORIGINAL_DIR%"
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
if exist "apps\strategy-service" (
|
|
echo Building strategy-service...
|
|
call turbo run build --filter="./apps/strategy-service"
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo ❌ strategy-service build failed
|
|
cd /d "%ORIGINAL_DIR%"
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
REM Step 3: Build dashboard with Angular CLI
|
|
echo 🎨 Building Angular dashboard...
|
|
cd apps\dashboard
|
|
call ng build --configuration production
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo ❌ Dashboard build failed
|
|
cd /d "%ORIGINAL_DIR%"
|
|
exit /b 1
|
|
)
|
|
|
|
cd /d "%ORIGINAL_DIR%"
|
|
echo 🎉 Complete build finished successfully!
|