Skip to content

Commit

Permalink
[infra] Version validation in prepare release workflow (#5723)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed Jun 27, 2024
1 parent 7922e30 commit 978b461
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/scripts/prepare-release.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ function CreatePullRequestToUpdateChangelogsAndPublicApis {
[Parameter()][string]$gitUserEmail
)

$match = [regex]::Match($version, '^(\d+\.\d+\.\d+)(?:-((?:alpha)|(?:beta)|(?:rc))\.(\d+))?$')
if ($match.Success -eq $false)
{
throw 'Input version did not match expected format'
}

$tag="${minVerTagPrefix}${version}"
$branch="release/prepare-${tag}-release"

Expand Down

0 comments on commit 978b461

Please sign in to comment.