From 53a9259804e4e3c5edc4a2238535584107b702ab Mon Sep 17 00:00:00 2001 From: selmankoc Date: Tue, 14 Apr 2026 15:53:42 +0300 Subject: [PATCH 1/2] Enhance NuGet package push scripts to track failed packages by logging them to a file --- nupkg/push_packages.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nupkg/push_packages.ps1 b/nupkg/push_packages.ps1 index 005610a346..5b37c22572 100644 --- a/nupkg/push_packages.ps1 +++ b/nupkg/push_packages.ps1 @@ -14,7 +14,9 @@ $totalProjectsCount = $projects.length $nugetUrl = "https://api.nuget.org/v3/index.json" $maxQuotaRetryCount = 3 $quotaRetryDelaysInSeconds = @(30, 60, 120) +$failedPackagesFilePath = Join-Path $packFolder "failed-packages.txt" Set-Location $packFolder +if (Test-Path $failedPackagesFilePath) { Remove-Item $failedPackagesFilePath -Force } foreach($project in $projects) { $i += 1 @@ -76,5 +78,6 @@ foreach($project in $projects) { if ($errorCount > 0) { Write-Host ("******* $errorCount error(s) occured *******") -ForegroundColor red + $failedPackages | Set-Content -Path $failedPackagesFilePath exit 1 } From 98144758f697e74e3584a5159d2382ecf294e7ca Mon Sep 17 00:00:00 2001 From: selmankoc Date: Tue, 14 Apr 2026 15:53:49 +0300 Subject: [PATCH 2/2] Refine NuGet package push script to initialize and log failed packages to a dedicated file, enhancing error tracking and management. --- nupkg/push-nightly-packages-myget.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nupkg/push-nightly-packages-myget.ps1 b/nupkg/push-nightly-packages-myget.ps1 index 3127d21f0c..76febf2e94 100644 --- a/nupkg/push-nightly-packages-myget.ps1 +++ b/nupkg/push-nightly-packages-myget.ps1 @@ -16,6 +16,8 @@ if (!$apikey) $maxRetryCount = 3 $retryDelaysInSeconds = @(30, 60, 120) $failedPackages = @() +$failedPackagesFilePath = Join-Path (Get-Location) "failed-packages.txt" +if (Test-Path $failedPackagesFilePath) { Remove-Item $failedPackagesFilePath -Force } $packages = Get-ChildItem -Filter *.nupkg | Sort-Object Name @@ -61,5 +63,6 @@ if ($failedPackages.Count -gt 0) { $errorCount = $failedPackages.Count Write-Host ("******* $errorCount error(s) occured *******") -ForegroundColor red + $failedPackages | Set-Content -Path $failedPackagesFilePath exit 1 } \ No newline at end of file