Skip to content

Commit 5fcc9a6

Browse files
author
begoldsm
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
2 parents 9ad3b56 + 1c47402 commit 5fcc9a6

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

tools/CommonIncrementVersion.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,25 @@ function SetArmCommonVersion([string]$FilePath, [string]$Version)
3030
Set-Content -Path $assemblyConfig -Value $content -Encoding UTF8
3131
}
3232

33+
function SetCommonAssemlbyVersions([string]$FilePath, [string]$Version)
34+
{
35+
$commonAssemblies = Join-Path $FilePath "Common"
36+
$assemblyInfos = Get-ChildItem -Path $commonAssemblies -Filter AssemblyInfo.cs -Recurse
37+
ForEach ($assemblyInfo in $assemblyInfos)
38+
{
39+
$content = Get-Content $assemblyInfo.FullName
40+
$content = $content -replace "\[assembly: AssemblyVersion\([\w\`"\.]+\)\]", "[assembly: AssemblyVersion(`"$Version`")]"
41+
$content = $content -replace "\[assembly: AssemblyFileVersion\([\w\`"\.]+\)\]", "[assembly: AssemblyFileVersion(`"$Version`")]"
42+
Write-Output "Updating assembly version in " $assemblyInfo.FullName
43+
Set-Content -Path $assemblyInfo.FullName -Value $content -Encoding UTF8
44+
}
45+
}
46+
3347
if (!$Folder)
3448
{
3549
$Folder = "$PSScriptRoot\..\src"
3650
}
3751

3852
SetCommandsCommonVersion $Folder $Version
53+
SetCommonAssemlbyVersions $Folder $Version
3954
SetArmCommonVersion $Folder $Version

tools/PreparePSRelease.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Param(
1919
.\ASMIncrementVersion.ps1 $Folder -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent
2020
.\ARMIncrementVersion.ps1 $Folder -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent
2121
.\ARMSyncVersion.ps1 $Folder
22-
.\ARMIncrementVersion.ps1 "$PSScriptRoot\..\src\Common\Storage" -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent
23-
.\ARMSyncVersion.ps1 "$PSScriptRoot\..\src\Common\Storage"
22+
.\ARMIncrementVersion.ps1 "$PSScriptRoot\..\src\Storage" -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent
23+
.\ARMSyncVersion.ps1 "$PSScriptRoot\..\src\Storage"
2424
.\ARMIncrementVersion.ps1 "$PSScriptRoot\AzureRM" -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent
2525
.\CommonIncrementVersion.ps1 $Version $Folder
2626
.\SetMsiVersion.ps1 $Version $Release $Folder

0 commit comments

Comments
 (0)