This commit is contained in:
Bojan Kucera 2025-06-09 20:49:48 -04:00
parent 9ebbf6aace
commit 2de71c6310
3 changed files with 74 additions and 24 deletions

View file

@ -19,11 +19,56 @@ if %ERRORLEVEL% NEQ 0 (
REM Step 2: Build apps with Turbo (excluding dashboard)
echo 🏗️ Building applications with Turbo...
call turbo run build --filter="./apps/data-service" --filter="./apps/execution-service" --filter="./apps/portfolio-service" --filter="./apps/processing-service" --filter="./apps/strategy-service"
if %ERRORLEVEL% NEQ 0 (
echo ❌ Turbo app build failed
cd /d "%ORIGINAL_DIR%"
exit /b 1
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

View file

@ -29,26 +29,28 @@ try {
& powershell ./scripts/build-libs.ps1
if ($LASTEXITCODE -ne 0) {
throw "Library build failed"
}
# Step 3: Build apps with Turbo (excluding dashboard)
} # Step 3: Build apps with Turbo (excluding dashboard)
Write-Host "🏗️ Building applications with Turbo..." -ForegroundColor Green
# Get list of apps excluding dashboard
$appDirs = Get-ChildItem -Path "apps" -Directory | Where-Object { $_.Name -ne "dashboard" }
$appFilters = $appDirs | ForEach-Object { "./apps/$($_.Name)" }
if ($appFilters.Count -gt 0) {
$filterArg = $appFilters -join " "
$turboCmd = "turbo run build --filter=`"$filterArg`""
if ($Verbose) {
Write-Host "Running: $turboCmd" -ForegroundColor DarkGray
}
Invoke-Expression $turboCmd
if ($LASTEXITCODE -ne 0) {
throw "Turbo app build failed"
if ($appDirs.Count -gt 0) {
# Build each app individually to avoid filter syntax issues
foreach ($app in $appDirs) {
$appPath = "./apps/$($app.Name)"
Write-Host " Building $($app.Name)..." -ForegroundColor Cyan
$turboCmd = "turbo run build --filter=$appPath"
if ($Verbose) {
Write-Host " Running: $turboCmd" -ForegroundColor DarkGray
}
Invoke-Expression $turboCmd
if ($LASTEXITCODE -ne 0) {
throw "Failed to build app: $($app.Name)"
}
}
Write-Host "✅ Apps built successfully: $($appDirs.Name -join ', ')" -ForegroundColor Green