Skip to content

Commit

Permalink
Add module version to changelog (#20669)
Browse files Browse the repository at this point in the history
* Add module version in changelog

* Update RunVersionController.ps1

* Update RunVersionController.ps1

* Update RunVersionController.ps1
  • Loading branch information
wyunchi-ms authored Jan 31, 2023
1 parent 4773fed commit eaa4d09
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tools/RunVersionController.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function Update-AzurePowerShellFile
} | Set-Content -Path $AzurePowerShellFile.FullName -Encoding UTF8
}

function Get-ReleaseNotes
function Get-ModuleMetadata
{
Param(
[Parameter(Mandatory = $true)]
Expand All @@ -155,7 +155,7 @@ function Get-ReleaseNotes
$ModuleManifestFile = $ModuleManifestFile[0]
}
Import-LocalizedData -BindingVariable ModuleMetadata -BaseDirectory $ModuleManifestFile.DirectoryName -FileName $ModuleManifestFile.Name
return $ModuleMetadata.PrivateData.PSData.ReleaseNotes
return $ModuleMetadata
}

function Update-ChangeLog
Expand Down Expand Up @@ -272,11 +272,13 @@ function Bump-AzVersion
$changeLog += "## $newVersion - $Release"
foreach ($updatedModule in $updatedModules)
{
$moduleMetadata = $(Get-ModuleMetadata -Module $updatedModule -RootPath $rootPath)
$moduleReleaseNotes = $moduleMetadata.PrivateData.PSData.ReleaseNotes
$releaseNotes += $updatedModule
$releaseNotes += $(Get-ReleaseNotes -Module $updatedModule -RootPath $rootPath) + "`n"
$releaseNotes += $moduleReleaseNotes + "`n"

$changeLog += "#### $updatedModule"
$changeLog += $(Get-ReleaseNotes -Module $updatedModule -RootPath $rootPath) + "`n"
$changeLog += "#### $updatedModule $($moduleMetadata.ModuleVersion)"
$changeLog += $moduleReleaseNotes + "`n"
}

$resolvedArtifactsOutputPath = (Resolve-Path $ArtifactsOutputPath).Path
Expand Down Expand Up @@ -449,4 +451,4 @@ Update-AzPreview
New-CommandMappingFile

# Generate dotnet csv
&$PSScriptRoot/Docs/GenerateDotNetCsv.ps1 -FeedPsd1FullPath "$PSScriptRoot\AzPreview\AzPreview.psd1"
&$PSScriptRoot/Docs/GenerateDotNetCsv.ps1 -FeedPsd1FullPath "$PSScriptRoot\AzPreview\AzPreview.psd1"

0 comments on commit eaa4d09

Please sign in to comment.