diff --git a/.azure/pipelines/apply-semantic-versioning-to-assembyinfo-files.yml b/.azure/pipelines/apply-semantic-versioning-to-assembyinfo-files.yml index d16cbfad..a113c952 100644 --- a/.azure/pipelines/apply-semantic-versioning-to-assembyinfo-files.yml +++ b/.azure/pipelines/apply-semantic-versioning-to-assembyinfo-files.yml @@ -24,4 +24,11 @@ steps: Write-Host "Could not extract a version from [$BuildNumber] using pattern [$Pattern]" exit 2 } + + # Set version variables + $extractedBuildNumbers = @($Matches[0].Split(([char[]]$PatternSplitCharacters))) + if ($extractedBuildNumbers.Length -ne $PatternExpectedVersionNumbers) { + Write-Host "The extracted build number $($Matches[0]) does not contain the expected $PatternExpectedVersionNumbers elements" + exit 2 + } pwsh: true