From a2e4157b9ff2c024a4b4185801a314e5b91fa636 Mon Sep 17 00:00:00 2001 From: dzaitsev Date: Wed, 21 May 2025 20:46:37 +0300 Subject: [PATCH] updated gdrive_upload_iterative.ps1 --- build/gdrive_upload_iterative.ps1 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build/gdrive_upload_iterative.ps1 b/build/gdrive_upload_iterative.ps1 index db228e9..221e4f9 100644 --- a/build/gdrive_upload_iterative.ps1 +++ b/build/gdrive_upload_iterative.ps1 @@ -1,10 +1,14 @@ +param ( + [string]$Path = "." +) + Write-Output "`n=== Starting Upload: Iterative Installer ===" $uploadFolder = "AzaionSuiteBuilds" Write-Output "[INFO] Target Google Drive folder: $uploadFolder" -Write-Output "[INFO] Looking for latest .exe matching 'AzaionSuite.Iterative.*.exe'..." +Write-Output "[INFO] Looking for latest .exe matching 'AzaionSuite.Iterative.*.exe' in folder: $Path..." -$iterativeFile = Get-ChildItem -Path . -Filter "AzaionSuite.Iterative.*.exe" | +$iterativeFile = Get-ChildItem -Path $Path -Filter "AzaionSuite.Iterative.*.exe" | Sort-Object LastWriteTime -Descending | Select-Object -First 1 @@ -16,12 +20,12 @@ if ($iterativeFile) { rclone copy "$($iterativeFile.FullName)" "AzaionGoogleDrive:$uploadFolder" --progress if ($LASTEXITCODE -eq 0) { - Write-Output "[SUCCESS] ✅ Iterative installer uploaded successfully." + Write-Output "[SUCCESS] Iterative installer uploaded successfully." } else { - Write-Output "[ERROR] ❌ Upload failed with exit code $LASTEXITCODE." + Write-Output "[ERROR] Upload failed with exit code $LASTEXITCODE." } } else { - Write-Output "[WARNING] ⚠️ No matching Iterative installer found in current directory." + Write-Output "[WARNING] No matching Iterative installer found in folder: $Path." } Write-Output "=== Upload Complete: Iterative Installer ===`n"