1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2024-12-25 17:27:48 +00:00

Fix Pipeline: Get text after list of commits

This commit is contained in:
junglebus 2020-03-14 16:57:34 +11:00 committed by GitHub
parent 1123e9d101
commit f4c8677091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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" }
}