Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tools/CommonIncrementVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions tools/PreparePSRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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