diff --git a/build/azure-pipelines/product-publish.ps1 b/build/azure-pipelines/product-publish.ps1 index 0059271113350..de53975fde3e1 100644 --- a/build/azure-pipelines/product-publish.ps1 +++ b/build/azure-pipelines/product-publish.ps1 @@ -48,16 +48,15 @@ $stages = @( if ($env:VSCODE_BUILD_STAGE_MACOS -eq 'True') { 'macOS' } ) +$artifacts = Get-PipelineArtifact -Name 'vscode_*' do { Start-Sleep -Seconds 10 - $res = Get-PipelineArtifact -Name 'vscode_*' - - if (!$res) { + if (!$artifacts) { continue } - $res | ForEach-Object { + $artifacts | ForEach-Object { $artifactName = $_.name if($set.Add($artifactName)) { Write-Host "Processing artifact: '$artifactName. Downloading from: $($_.resource.downloadUrl)" @@ -107,6 +106,9 @@ do { break } } -} while (!$otherStageFinished) + + $artifacts = Get-PipelineArtifact -Name 'vscode_*' + $artifactsStillToProcess = $artifacts.Count -ne $set.Count +} while (!$otherStageFinished -or $artifactsStillToProcess) Write-Host "Processed $($set.Count) artifacts."