forked from microsoftgraph/msgraph-sdk-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetServiceModuleVersion.ps1
More file actions
25 lines (24 loc) · 954 Bytes
/
Copy pathSetServiceModuleVersion.ps1
File metadata and controls
25 lines (24 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
Param(
[string] $VersionNumber,
[string] $ReleaseNotes = "See https://aka.ms/GraphPowerShell-Release.",
[string[]] $Modules = $null
)
$WriteToModuleReadMe = Join-Path $PSScriptRoot ".\WriteToModuleReadMe.ps1" -Resolve
$ModulesReadme = @()
if ($null -ne $Modules) {
$Modules | ForEach-Object {
$ReadMePath = Join-Path $PSScriptRoot "..\src\$_\$_\readme.md"
$ModulesReadme += Get-Item $ReadMePath
}
} else {
$ReadMePath = Join-Path $PSScriptRoot "..\src\*\*\readme.md"
# Get all module readme.md
$ModulesReadme = Get-Item $ReadMePath
}
$ModulesReadme | ForEach-Object {
# Set readme values.
& $WriteToModuleReadMe -ReadMePath $_.FullName -FieldName "module-version" -NewFieldValue $VersionNumber
& $WriteToModuleReadMe -ReadMePath $_.FullName -FieldName "release-notes" -NewFieldValue $ReleaseNotes
}