Skip to content

Commit

Permalink
Fix regex in repackaging script (#427) (#428)
Browse files Browse the repository at this point in the history
The regex for extracting the version number from the package.json file was grabbing the wrong version in some instances.  Fixed.

(cherry picked from commit 20a0728)
  • Loading branch information
shaynie authored Aug 21, 2023
1 parent 9ddeb9d commit c686733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pipelines/Scripts/repackage-for-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ try {
Write-Output "Creating $packageName"
Write-Output "====================="

$inlineVersion = Select-String '^.*"version":.*"(?<sem>[0-9]\.[0-9]\.[0-9])-(?<prerelease>prerelease\.)*(?<tag>pre\.\d*)*\.*(?<build>\d{6}\.\d*)' -InputObject (Get-Content -Path $_)
$inlineVersion = Select-String '^.*"version":\s*"(?<sem>[0-9]\.[0-9]\.[0-9])-(?<prerelease>prerelease\.)*(?<tag>pre\.\d*)*\.*(?<build>\d{6}\.\d*)' -InputObject (Get-Content -Path $_)
$version = $inlineVersion.Matches[0].Groups['sem'].Value
$prerelease = $inlineVersion.Matches[0].Groups['prerelease'].Value
$tag = $inlineVersion.Matches[0].Groups['tag'].Value
Expand Down

0 comments on commit c686733

Please sign in to comment.