Fail script when push to repo fails
This commit is contained in:
parent
81d617d3b8
commit
12f7a0367d
|
|
@ -109,6 +109,10 @@ try {
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Warning "Error in pushing $($submodule.module): $_"
|
Write-Warning "Error in pushing $($submodule.module): $_"
|
||||||
|
$build_errors += @{
|
||||||
|
Repo = $submodule.module
|
||||||
|
Message = $_
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -130,6 +134,10 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($build_errors.Count -gt 0 ) {
|
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"
|
throw "Failed to build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue