From f4c8677091833ef7335789ed097337f454ebfd05 Mon Sep 17 00:00:00 2001 From: junglebus <22320807+junglebus@users.noreply.github.com> Date: Sat, 14 Mar 2020 16:57:34 +1100 Subject: [PATCH] Fix Pipeline: Get text after list of commits --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eac739b3d..9873326ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -386,11 +386,11 @@ stages: { Write-Output $logUrl $logText = Invoke-WebRequest $logUrl - if ($logText -like '*: GitHub Release*') + if ($logText -like '*Creating a release for tag:*') { - $logInspect = ($logText -split "Creating a release for tag:")[1] - $successCount = (Select-String "Uploaded file successfully:" -InputObject $logText -AllMatches).Matches.Count - $failureCount = (Select-String "Duplicate asset found:" -InputObject $logText -AllMatches).Matches.Count + $logInspect = ($logText -split "Creating a release for tag:")[2] + $successCount = (Select-String "Uploaded file successfully:" -InputObject $logInspect -AllMatches).Matches.Count + $failureCount = (Select-String "Duplicate asset found:" -InputObject $logInspect -AllMatches).Matches.Count Write-Output "Success count is: $successCount and failure count is: $failureCount" if (($successCount -ne 7) -or ($failureCount -ne 0)) { Write-Host "##vso[task.complete result=Failed;]DONE" } }