From 7609092607c17404ef30868c6267e0307392b444 Mon Sep 17 00:00:00 2001 From: Hovsep Mkrtchyan Date: Wed, 23 Mar 2016 11:01:59 -0700 Subject: [PATCH] Fixed Storage folder location for Release PS Script --- tools/CommonIncrementVersion.ps1 | 15 +++++++++++++++ tools/PreparePSRelease.ps1 | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tools/CommonIncrementVersion.ps1 b/tools/CommonIncrementVersion.ps1 index 22bcfa816610..0e26f060581b 100644 --- a/tools/CommonIncrementVersion.ps1 +++ b/tools/CommonIncrementVersion.ps1 @@ -30,10 +30,25 @@ function SetArmCommonVersion([string]$FilePath, [string]$Version) Set-Content -Path $assemblyConfig -Value $content -Encoding UTF8 } +function SetCommonAssemlbyVersions([string]$FilePath, [string]$Version) +{ + $commonAssemblies = Join-Path $FilePath "Common" + $assemblyInfos = Get-ChildItem -Path $commonAssemblies -Filter AssemblyInfo.cs -Recurse + ForEach ($assemblyInfo in $assemblyInfos) + { + $content = Get-Content $assemblyInfo.FullName + $content = $content -replace "\[assembly: AssemblyVersion\([\w\`"\.]+\)\]", "[assembly: AssemblyVersion(`"$Version`")]" + $content = $content -replace "\[assembly: AssemblyFileVersion\([\w\`"\.]+\)\]", "[assembly: AssemblyFileVersion(`"$Version`")]" + Write-Output "Updating assembly version in " $assemblyInfo.FullName + Set-Content -Path $assemblyInfo.FullName -Value $content -Encoding UTF8 + } +} + if (!$Folder) { $Folder = "$PSScriptRoot\..\src" } SetCommandsCommonVersion $Folder $Version +SetCommonAssemlbyVersions $Folder $Version SetArmCommonVersion $Folder $Version \ No newline at end of file diff --git a/tools/PreparePSRelease.ps1 b/tools/PreparePSRelease.ps1 index 5fdf068fac8a..c64f0a96c027 100644 --- a/tools/PreparePSRelease.ps1 +++ b/tools/PreparePSRelease.ps1 @@ -19,8 +19,8 @@ Param( .\ASMIncrementVersion.ps1 $Folder -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent .\ARMIncrementVersion.ps1 $Folder -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent .\ARMSyncVersion.ps1 $Folder -.\ARMIncrementVersion.ps1 "$PSScriptRoot\..\src\Common\Storage" -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent -.\ARMSyncVersion.ps1 "$PSScriptRoot\..\src\Common\Storage" +.\ARMIncrementVersion.ps1 "$PSScriptRoot\..\src\Storage" -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent +.\ARMSyncVersion.ps1 "$PSScriptRoot\..\src\Storage" .\ARMIncrementVersion.ps1 "$PSScriptRoot\AzureRM" -Major $Major.IsPresent -Minor $Minor.IsPresent -Patch $Patch.IsPresent .\CommonIncrementVersion.ps1 $Version $Folder .\SetMsiVersion.ps1 $Version $Release $Folder \ No newline at end of file