Skip to content

Commit bec7f02

Browse files
authored
Merge branch 'main' into oob/Oracle
2 parents 50ec1ff + 7173da7 commit bec7f02

File tree

7,729 files changed

+808734
-304202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,729 files changed

+808734
-304202
lines changed

.azure-pipelines/PipelineSteps/analyze-steps.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ param (
1616
[string]$PowerShellPlatform
1717
)
1818

19+
function Assert-ExitCodeSuccess {
20+
param(
21+
[string]$Operation = "Command"
22+
)
23+
if (($LASTEXITCODE -ne 0) -and ($LASTEXITCODE -ne $null)) {
24+
Write-Error "$Operation failed with exit code $LASTEXITCODE"
25+
exit $LASTEXITCODE
26+
}
27+
}
28+
1929
# Install PowerShell dependencies
2030
Write-Host -ForegroundColor Green "-------------------- Start installing PowerShell dependencies ... --------------------"
2131
Install-Module "platyPS", "PSScriptAnalyzer" -Repository PSGallery -Force -Confirm:$false -Scope CurrentUser
@@ -36,9 +46,11 @@ if ($PowerShellPlatform) {
3646
}
3747
$buildProjPath = Join-Path $RepoRoot 'build.proj'
3848
dotnet msbuild $buildProjPath /t:GenerateHelp "/p:Configuration=$Configuration"
49+
Assert-ExitCodeSuccess -Operation "Help generation"
3950
Write-Host -ForegroundColor DarkGreen "-------------------- End generating help ... --------------------`n`n`n`n`n"
4051

4152
# Static Analysis
4253
Write-Host -ForegroundColor Green "-------------------- Start static analysis ... --------------------"
4354
dotnet msbuild $buildProjPath /t:StaticAnalysis "/p:Configuration=$Configuration"
55+
Assert-ExitCodeSuccess -Operation "Static analysis"
4456
Write-Host -ForegroundColor DarkGreen "-------------------- End static analysis ... --------------------`n`n`n`n`n"

0 commit comments

Comments
 (0)