Pipeline: Get text after list of commits #3

This commit is contained in:
junglebus 2020-03-14 17:20:38 +11:00 committed by GitHub
parent f4c8677091
commit 0979b0c86d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ stages:
$logText = Invoke-WebRequest $logUrl
if ($logText -like '*Creating a release for tag:*')
{
$logInspect = ($logText -split "Creating a release for tag:")[2]
$logInspect = ($logText -split "Creating a release for tag:")[-1]
$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"