Skip to content

Commit eaa4d09

Browse files
authored
Add module version to changelog (#20669)
* Add module version in changelog * Update RunVersionController.ps1 * Update RunVersionController.ps1 * Update RunVersionController.ps1
1 parent 4773fed commit eaa4d09

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tools/RunVersionController.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function Update-AzurePowerShellFile
129129
} | Set-Content -Path $AzurePowerShellFile.FullName -Encoding UTF8
130130
}
131131

132-
function Get-ReleaseNotes
132+
function Get-ModuleMetadata
133133
{
134134
Param(
135135
[Parameter(Mandatory = $true)]
@@ -155,7 +155,7 @@ function Get-ReleaseNotes
155155
$ModuleManifestFile = $ModuleManifestFile[0]
156156
}
157157
Import-LocalizedData -BindingVariable ModuleMetadata -BaseDirectory $ModuleManifestFile.DirectoryName -FileName $ModuleManifestFile.Name
158-
return $ModuleMetadata.PrivateData.PSData.ReleaseNotes
158+
return $ModuleMetadata
159159
}
160160

161161
function Update-ChangeLog
@@ -272,11 +272,13 @@ function Bump-AzVersion
272272
$changeLog += "## $newVersion - $Release"
273273
foreach ($updatedModule in $updatedModules)
274274
{
275+
$moduleMetadata = $(Get-ModuleMetadata -Module $updatedModule -RootPath $rootPath)
276+
$moduleReleaseNotes = $moduleMetadata.PrivateData.PSData.ReleaseNotes
275277
$releaseNotes += $updatedModule
276-
$releaseNotes += $(Get-ReleaseNotes -Module $updatedModule -RootPath $rootPath) + "`n"
278+
$releaseNotes += $moduleReleaseNotes + "`n"
277279

278-
$changeLog += "#### $updatedModule"
279-
$changeLog += $(Get-ReleaseNotes -Module $updatedModule -RootPath $rootPath) + "`n"
280+
$changeLog += "#### $updatedModule $($moduleMetadata.ModuleVersion)"
281+
$changeLog += $moduleReleaseNotes + "`n"
280282
}
281283

282284
$resolvedArtifactsOutputPath = (Resolve-Path $ArtifactsOutputPath).Path
@@ -449,4 +451,4 @@ Update-AzPreview
449451
New-CommandMappingFile
450452

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

0 commit comments

Comments
 (0)