Aggiunta script test compilazioni
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Cerca ricorsivamente solo le soluzioni che iniziano con 'IOB-WIN-'
|
||||
$pattern = "IOB-WIN-*.sln"
|
||||
$solutions = Get-ChildItem -Path . -Filter $pattern -Recurse
|
||||
|
||||
if ($solutions.Count -eq 0) {
|
||||
Write-Host "⚠️ Nessuna soluzione trovata che corrisponde al pattern: $pattern" -ForegroundColor Yellow
|
||||
Exit
|
||||
}
|
||||
|
||||
Write-Host "🚀 Trovate $($solutions.Count) soluzioni da verificare." -ForegroundColor Magenta
|
||||
|
||||
# Inizializzazione variabili per il riepilogo
|
||||
$successCount = 0
|
||||
$failCount = 0
|
||||
$failedSolutions = @()
|
||||
|
||||
foreach ($sol in $solutions) {
|
||||
Write-Host "`n--------------------------------------------------" -ForegroundColor Cyan
|
||||
Write-Host "Compilazione in corso: $($sol.Name)" -ForegroundColor White
|
||||
Write-Host "--------------------------------------------------" -ForegroundColor Cyan
|
||||
|
||||
# Esegue la compilazione
|
||||
dotnet build $sol.FullName --configuration Debug --no-incremental
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "❌ Errore nella compilazione di $($sol.Name)" -ForegroundColor Red
|
||||
$failCount++
|
||||
$failedSolutions += $sol.Name
|
||||
}
|
||||
else {
|
||||
Write-Host "✅ $($sol.Name) compilata con successo!" -ForegroundColor Green
|
||||
$successCount++
|
||||
}
|
||||
}
|
||||
|
||||
# Determina il colore del testo per i fallimenti in modo retrocompatibile
|
||||
$failColor = "Gray"
|
||||
if ($failCount -gt 0) { $failColor = "Red" }
|
||||
|
||||
# --- RIEPILOGO FINALE ---
|
||||
Write-Host "`n==================================================" -ForegroundColor Magenta
|
||||
Write-Host " 🏁 Processo di verifica completato!" -ForegroundColor Magenta
|
||||
Write-Host "==================================================" -ForegroundColor Magenta
|
||||
Write-Host " Successi: $successCount" -ForegroundColor Green
|
||||
Write-Host " Falliti: $failCount" -ForegroundColor $failColor
|
||||
|
||||
if ($failCount -gt 0) {
|
||||
Write-Host "`n❌ Elenco delle soluzioni fallite:" -ForegroundColor Red
|
||||
foreach ($failed in $failedSolutions) {
|
||||
Write-Host " - $failed" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "`n🎉 Ottimo! Tutte le soluzioni sono state compilate senza errori." -ForegroundColor Green
|
||||
}
|
||||
Write-Host "==================================================" -ForegroundColor Magenta
|
||||
Reference in New Issue
Block a user