mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Increment RC MSI build number by 100 (#16354)
This commit is contained in:
@@ -3096,7 +3096,7 @@ function Get-WindowsNames {
|
||||
Write-Verbose -Message "Getting Windows Names for ProductName: $ProductName; ProductNameSuffix: $ProductNameSuffix; ProductVersion: $ProductVersion" -Verbose
|
||||
|
||||
$ProductSemanticVersion = Get-PackageSemanticVersion -Version $ProductVersion
|
||||
$ProductVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $ProductVersion
|
||||
$ProductVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $ProductVersion -IncrementBuildNumber
|
||||
|
||||
$productVersionWithName = $ProductName + '_' + $ProductVersion
|
||||
$productSemanticVersionWithName = $ProductName + '-' + $ProductSemanticVersion
|
||||
@@ -3748,8 +3748,9 @@ function Get-PackageVersionAsMajorMinorBuildRevision
|
||||
# Version of the Package
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $Version
|
||||
)
|
||||
[string] $Version,
|
||||
[switch] $IncrementBuildNumber
|
||||
)
|
||||
|
||||
Write-Verbose "Extract the version in the form of major.minor[.build[.revision]] for $Version"
|
||||
$packageVersionTokens = $Version.Split('-')
|
||||
@@ -3770,6 +3771,10 @@ function Get-PackageVersionAsMajorMinorBuildRevision
|
||||
$packageBuildTokens = $packageBuildTokens.Substring(0,4)
|
||||
}
|
||||
|
||||
if ($packageVersionTokens[1] -match 'rc' -and $IncrementBuildNumber) {
|
||||
$packageBuildTokens = [int]$packageBuildTokens + 100
|
||||
}
|
||||
|
||||
$packageVersion = $packageVersion + '.' + $packageBuildTokens
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user