mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:36:29 +00:00
updatedd zip_full.ps1 top pick only the latest file by LastWriteTime
This commit is contained in:
+8
-9
@@ -1,4 +1,3 @@
|
|||||||
# zip_full.ps1
|
|
||||||
$host.UI.RawUI.WindowTitle = "Full Installer Zipper"
|
$host.UI.RawUI.WindowTitle = "Full Installer Zipper"
|
||||||
Write-Host "`n===== [AZAION SUITE FULL PACKAGER] =====" -ForegroundColor Cyan
|
Write-Host "`n===== [AZAION SUITE FULL PACKAGER] =====" -ForegroundColor Cyan
|
||||||
|
|
||||||
@@ -26,17 +25,17 @@ Set-Location ..
|
|||||||
$currentDir = Get-Location
|
$currentDir = Get-Location
|
||||||
Write-Host "[INFO] Working directory: $currentDir" -ForegroundColor Gray
|
Write-Host "[INFO] Working directory: $currentDir" -ForegroundColor Gray
|
||||||
|
|
||||||
# Locate Full EXE
|
# Locate latest Full EXE by LastWriteTime
|
||||||
$fullExe = Get-ChildItem -Filter "AzaionSuite.Full.*.exe" | Select-Object -First 1
|
$fullExe = Get-ChildItem -Filter "AzaionSuite.Full.*.exe" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
||||||
|
|
||||||
if (-not $fullExe) {
|
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
|
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)
|
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($fullExe.Name)
|
||||||
$binFiles = Get-ChildItem -Filter "$baseName-*.bin"
|
$binFiles = Get-ChildItem -Filter "$baseName-*.bin"
|
||||||
|
|
||||||
@@ -60,10 +59,10 @@ Show-ProgressBar -Activity "Compressing files..." -Steps 25 -Delay 25
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Compress-Archive -Force -Path $toZip -DestinationPath $zipPath -Verbose
|
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 {
|
} catch {
|
||||||
Write-Host "[ERROR] ❌ Failed to create ZIP archive: $_" -ForegroundColor Red
|
Write-Host "[ERROR] Failed to create ZIP archive: $_" -ForegroundColor Red
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "`n[FINISHED] ✅ Full installer packaging complete." -ForegroundColor Cyan
|
Write-Host "`n[FINISHED] Full installer packaging complete." -ForegroundColor Cyan
|
||||||
|
|||||||
Reference in New Issue
Block a user