mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Merge pull request #1535 from PowerShell/RaghuS-PackagingBranch
Fix for handling alphanumeric characters in package build field
This commit is contained in:
commit
0814942d88
1 file changed
+3
-2
+3
-2
@@ -1555,12 +1555,13 @@ function Get-PackageVersionAsMajorMinorBuildRevision
|
|||||||
if (1 -eq $packageVersionTokens.Count)
|
if (1 -eq $packageVersionTokens.Count)
|
||||||
{
|
{
|
||||||
# In case the input is of the form a.b.c, add a '0' at the end for revision field
|
# In case the input is of the form a.b.c, add a '0' at the end for revision field
|
||||||
$packageVersion = $packageVersion + '.0'
|
$packageVersion = $packageVersion + '.0'
|
||||||
}
|
}
|
||||||
elseif (1 -lt $packageVersionTokens.Count)
|
elseif (1 -lt $packageVersionTokens.Count)
|
||||||
{
|
{
|
||||||
# We have all the four fields
|
# We have all the four fields
|
||||||
$packageVersion = $packageVersion + '.' + $packageVersionTokens[1]
|
$packageBuildTokens = ([regex]::Matches($packageVersionTokens[1], "\d+"))[0].value
|
||||||
|
$packageVersion = $packageVersion + '.' + $packageBuildTokens[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
return $packageVersion
|
return $packageVersion
|
||||||
|
|||||||
Reference in new issue
Block a user