Fail script when push to repo fails

This commit is contained in:
Ryan Brandenburg 2018-02-07 11:29:14 -08:00
parent 81d617d3b8
commit 12f7a0367d
1 changed files with 8 additions and 0 deletions

View File

@ -109,6 +109,10 @@ try {
}
catch {
Write-Warning "Error in pushing $($submodule.module): $_"
$build_errors += @{
Repo = $submodule.module
Message = $_
}
continue
}
}
@ -130,6 +134,10 @@ try {
}
if ($build_errors.Count -gt 0 ) {
Write-Warning "The following repos failed:"
foreach ($error in $build_errors) {
Write-Warning " - $($error.Repo)"
}
throw "Failed to build"
}
}