From e957f1192aeb4bc4d4dfe5dd07f0d58a52b326e5 Mon Sep 17 00:00:00 2001 From: dzaitsev Date: Fri, 23 May 2025 12:11:48 +0300 Subject: [PATCH] updatedd zip_full.ps1 top pick only the latest file by LastWriteTime --- build/zip_full.ps1 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/build/zip_full.ps1 b/build/zip_full.ps1 index 76cc23d..0a54b95 100644 --- a/build/zip_full.ps1 +++ b/build/zip_full.ps1 @@ -1,4 +1,3 @@ -# zip_full.ps1 $host.UI.RawUI.WindowTitle = "Full Installer Zipper" Write-Host "`n===== [AZAION SUITE FULL PACKAGER] =====" -ForegroundColor Cyan @@ -26,17 +25,17 @@ Set-Location .. $currentDir = Get-Location Write-Host "[INFO] Working directory: $currentDir" -ForegroundColor Gray -# Locate Full EXE -$fullExe = Get-ChildItem -Filter "AzaionSuite.Full.*.exe" | Select-Object -First 1 +# Locate latest Full EXE by LastWriteTime +$fullExe = Get-ChildItem -Filter "AzaionSuite.Full.*.exe" | Sort-Object LastWriteTime -Descending | Select-Object -First 1 if (-not $fullExe) { - Write-Host "[ERROR] ❌ No Full build EXE found (AzaionSuite.Full.*.exe)" -ForegroundColor Red + Write-Host "[ERROR] No Full build EXE found (AzaionSuite.Full.*.exe)" -ForegroundColor Red exit 1 } -Write-Host "[OK] ✅ Found Full EXE: $($fullExe.Name)" -ForegroundColor Green +Write-Host "[OK] Found Full EXE: $($fullExe.Name)" -ForegroundColor Green -# Match BIN files +# Match BIN files with same base name $baseName = [System.IO.Path]::GetFileNameWithoutExtension($fullExe.Name) $binFiles = Get-ChildItem -Filter "$baseName-*.bin" @@ -60,10 +59,10 @@ Show-ProgressBar -Activity "Compressing files..." -Steps 25 -Delay 25 try { Compress-Archive -Force -Path $toZip -DestinationPath $zipPath -Verbose - Write-Host "[SUCCESS] 🎉 ZIP archive created successfully: $zipName" -ForegroundColor Green + Write-Host "[SUCCESS] ZIP archive created successfully: $zipName" -ForegroundColor Green } catch { - Write-Host "[ERROR] ❌ Failed to create ZIP archive: $_" -ForegroundColor Red + Write-Host "[ERROR] Failed to create ZIP archive: $_" -ForegroundColor Red exit 1 } -Write-Host "`n[FINISHED] ✅ Full installer packaging complete." -ForegroundColor Cyan +Write-Host "`n[FINISHED] Full installer packaging complete." -ForegroundColor Cyan