mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[release/v7.4] Make the AssemblyVersion not change for servicing releases 7.4.7 and onward (#24821)
* Make the `AssemblyVersion` not change for servicing releases (#24667) * Keep `AssemblyVersion` unchanged for servicing releases 7.4.7 and plus --------- Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
This commit is contained in:
co-authored by
Travis Plunk
parent
aaf0626eaf
commit
3e17fc1667
@@ -120,7 +120,7 @@ jobs:
|
||||
$refAssemblyFolder = Join-Path '$(System.ArtifactsDirectory)' 'RefAssembly'
|
||||
$null = New-Item -Path $refAssemblyFolder -Force -Verbose -Type Directory
|
||||
|
||||
Start-PSBuild -Clean -Runtime linux-x64 -Configuration Release
|
||||
Start-PSBuild -Clean -Runtime linux-x64 -Configuration Release -ReleaseTag $(ReleaseTagVar)
|
||||
|
||||
$sharedModules | Foreach-Object {
|
||||
$refFile = Get-ChildItem -Path "$(PowerShellRoot)\src\$_\obj\Release\net8.0\refint\$_.dll"
|
||||
@@ -136,7 +136,7 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
Start-PSBuild -Clean -Runtime win7-x64 -Configuration Release
|
||||
Start-PSBuild -Clean -Runtime win7-x64 -Configuration Release -ReleaseTag $(ReleaseTagVar)
|
||||
|
||||
$winOnlyModules | Foreach-Object {
|
||||
$refFile = Get-ChildItem -Path "$(PowerShellRoot)\src\$_\obj\Release\net8.0\refint\*.dll"
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
<PSCoreFileVersion Condition = "'$(ReleaseTagSemVersionPart)' != ''">$(ReleaseTagVersionPart).$(ReleaseTagSemVersionPart)</PSCoreFileVersion>
|
||||
<!-- Create the version if we have a release build -->
|
||||
<PSCoreFileVersion Condition = "'$(PSCoreFileVersion)' == ''">$(ReleaseTagVersionPart).$(GAIncrementValue)</PSCoreFileVersion>
|
||||
<!-- Set 'FileVersion' and 'AssemblyVersion' explicitly:
|
||||
- make 'FileVersion' the same as 'PSCoreFileVersion'
|
||||
- make 'AssemblyVersion' be the 'PSCoreFileVersion' with the 'Build' field set to 6, so the assembly version doesn't change for servicing releases 7.4.7 and plus -->
|
||||
<FileVersion>$(PSCoreFileVersion)</FileVersion>
|
||||
<AssemblyVersion>$([System.Version]::Parse($(PSCoreFileVersion)).Major).$([System.Version]::Parse($(PSCoreFileVersion)).Minor).6.$([System.Version]::Parse($(PSCoreFileVersion)).Revision)</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -84,7 +89,7 @@
|
||||
-->
|
||||
|
||||
<!--
|
||||
Here we define explicitly 'Version' to set 'FileVersion' and 'AssemblyVersion' by 'GetAssemblyVersion' target in 'Microsoft.NET.GenerateAssemblyInfo.targets'.
|
||||
Here we define explicitly 'Version' to set 'FileVersion' and 'AssemblyVersion' when they are not explicitly set.
|
||||
Here we define explicitly 'InformationalVersion' because by default it is defined as 'Version' by 'GetAssemblyVersion' target in 'Microsoft.NET.GenerateAssemblyInfo.targets'.
|
||||
-->
|
||||
<Version>$(PSCoreFileVersion)</Version>
|
||||
|
||||
Reference in New Issue
Block a user