stock-bot/scripts/build-libs.ps1

32 lines
1.2 KiB
PowerShell

# Build and install the new libraries
Write-Host "Building and installing new libraries..." -ForegroundColor Cyan
# Build order is important due to dependencies
$libs = @(
"types", # Base types - no dependencies
"logger", # Logging utilities - depends on types
"config", # Configuration - depends on types
"utils", # Utilities - depends on types and config "cache", # Cache - depends on types and logger
"http", # HTTP client - depends on types, config, logger
"postgres-client", # PostgreSQL client - depends on types, config, logger
"mongodb-client", # MongoDB client - depends on types, config, logger
"questdb-client" # QuestDB client - depends on types, config, logger
)
# Build each library in order
foreach ($lib in $libs) {
$libPath = "g:\repos\stock-bot\libs\$lib"
Write-Host "Building $lib..." -ForegroundColor Green
Set-Location $libPath
bun run build
if ($LASTEXITCODE -ne 0) {
Write-Host "Failed to build $lib. Exiting." -ForegroundColor Red
exit 1
}
}
Write-Host "All libraries built successfully!" -ForegroundColor Green
Set-Location g:\repos\stock-bot