linxus fs fixes

This commit is contained in:
Boki 2025-06-09 22:55:51 -04:00
parent ac23b70146
commit 0b7846fe67
292 changed files with 41947 additions and 41947 deletions

View file

@ -1,108 +1,108 @@
# Build All Script for Stock Bot
# Builds libraries first, then apps with Turbo, then dashboard with Angular CLI
param(
[switch]$Clean,
[switch]$Verbose
)
$ErrorActionPreference = "Stop"
Write-Host "🚀 Starting complete build process..." -ForegroundColor Cyan
# Store original location
$originalLocation = Get-Location
Set-Location "g:\repos\stock-bot"
try {
# Step 1: Clean if requested
if ($Clean) {
Write-Host "🧹 Cleaning previous builds..." -ForegroundColor Yellow
& powershell ./scripts/clean.ps1 -dist
if ($LASTEXITCODE -ne 0) {
throw "Clean failed"
}
}
# Step 2: Build libraries first
Write-Host "📚 Building libraries..." -ForegroundColor Green
& powershell ./scripts/build-libs.ps1
if ($LASTEXITCODE -ne 0) {
throw "Library build failed"
} # 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" }
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
} else {
Write-Host " No non-dashboard apps found to build with Turbo" -ForegroundColor Yellow
}
# Step 4: Build dashboard with Angular CLI
$dashboardPath = "apps/dashboard"
if (Test-Path $dashboardPath) {
Write-Host "🎨 Building Angular dashboard..." -ForegroundColor Green
Set-Location $dashboardPath
# Check if ng is available
try {
ng version | Out-Null
} catch {
Write-Host "❌ Angular CLI not found. Installing..." -ForegroundColor Red
npm install -g @angular/cli
if ($LASTEXITCODE -ne 0) {
throw "Failed to install Angular CLI"
}
}
# Build dashboard
ng build --configuration production
if ($LASTEXITCODE -ne 0) {
throw "Dashboard build failed"
}
Write-Host "✅ Dashboard built successfully" -ForegroundColor Green
Set-Location $originalLocation
} else {
Write-Host "⚠️ Dashboard not found at $dashboardPath" -ForegroundColor Yellow
}
Write-Host "🎉 Complete build finished successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Build Summary:" -ForegroundColor Cyan
Write-Host " ✅ Libraries built" -ForegroundColor Green
if ($appFilters.Count -gt 0) {
Write-Host " ✅ Apps built: $($appDirs.Name -join ', ')" -ForegroundColor Green
}
if (Test-Path "apps/dashboard") {
Write-Host " ✅ Dashboard built" -ForegroundColor Green
}
} catch {
Write-Host "❌ Build failed: $($_.Exception.Message)" -ForegroundColor Red
Set-Location $originalLocation
exit 1
} finally {
Set-Location $originalLocation
}
# Build All Script for Stock Bot
# Builds libraries first, then apps with Turbo, then dashboard with Angular CLI
param(
[switch]$Clean,
[switch]$Verbose
)
$ErrorActionPreference = "Stop"
Write-Host "🚀 Starting complete build process..." -ForegroundColor Cyan
# Store original location
$originalLocation = Get-Location
Set-Location "g:\repos\stock-bot"
try {
# Step 1: Clean if requested
if ($Clean) {
Write-Host "🧹 Cleaning previous builds..." -ForegroundColor Yellow
& powershell ./scripts/clean.ps1 -dist
if ($LASTEXITCODE -ne 0) {
throw "Clean failed"
}
}
# Step 2: Build libraries first
Write-Host "📚 Building libraries..." -ForegroundColor Green
& powershell ./scripts/build-libs.ps1
if ($LASTEXITCODE -ne 0) {
throw "Library build failed"
} # 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" }
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
} else {
Write-Host " No non-dashboard apps found to build with Turbo" -ForegroundColor Yellow
}
# Step 4: Build dashboard with Angular CLI
$dashboardPath = "apps/dashboard"
if (Test-Path $dashboardPath) {
Write-Host "🎨 Building Angular dashboard..." -ForegroundColor Green
Set-Location $dashboardPath
# Check if ng is available
try {
ng version | Out-Null
} catch {
Write-Host "❌ Angular CLI not found. Installing..." -ForegroundColor Red
npm install -g @angular/cli
if ($LASTEXITCODE -ne 0) {
throw "Failed to install Angular CLI"
}
}
# Build dashboard
ng build --configuration production
if ($LASTEXITCODE -ne 0) {
throw "Dashboard build failed"
}
Write-Host "✅ Dashboard built successfully" -ForegroundColor Green
Set-Location $originalLocation
} else {
Write-Host "⚠️ Dashboard not found at $dashboardPath" -ForegroundColor Yellow
}
Write-Host "🎉 Complete build finished successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Build Summary:" -ForegroundColor Cyan
Write-Host " ✅ Libraries built" -ForegroundColor Green
if ($appFilters.Count -gt 0) {
Write-Host " ✅ Apps built: $($appDirs.Name -join ', ')" -ForegroundColor Green
}
if (Test-Path "apps/dashboard") {
Write-Host " ✅ Dashboard built" -ForegroundColor Green
}
} catch {
Write-Host "❌ Build failed: $($_.Exception.Message)" -ForegroundColor Red
Set-Location $originalLocation
exit 1
} finally {
Set-Location $originalLocation
}