Skip to content

Commit 3db259f

Browse files
committed
Update to latest
1 parent 362149d commit 3db259f

File tree

3 files changed

+9
-256
lines changed

3 files changed

+9
-256
lines changed

.github/workflows/platform.updateModuleRegistryTables.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
. (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'tools' 'platform' 'Set-BicepModuleStatusBadgesTable.ps1')
7171
7272
$functionInput = @{
73-
MarkdownFilePath = Join-Path $env:GITHUB_WORKSPACE 'docs' 'content' 'indexes' 'bicep' '_index.md'
73+
MarkdownFilePath = Join-Path $env:GITHUB_WORKSPACE 'docs' 'static' 'module-features' 'bicepBadges.md'
7474
ModulesRepoRootPath = Join-Path $env:GITHUB_WORKSPACE 'bicep-registry-modules'
7575
ModulesFolderPath = Join-Path $env:GITHUB_WORKSPACE 'bicep-registry-modules' 'avm' 'res'
7676
}
@@ -87,7 +87,7 @@ jobs:
8787
. (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'tools' 'platform' 'Set-BicepModulesFeatureCSV.ps1')
8888
8989
$functionInput = @{
90-
CSVFilePath = Join-Path $env:GITHUB_WORKSPACE 'docs' 'static' 'module-features' 'bicepFeatures.csv
90+
CSVFilePath = Join-Path $env:GITHUB_WORKSPACE 'docs' 'static' 'module-features' 'bicepFeatures.csv'
9191
ModulesRepoRootPath = Join-Path $env:GITHUB_WORKSPACE 'bicep-registry-modules'
9292
ModulesFolderPath = Join-Path $env:GITHUB_WORKSPACE 'bicep-registry-modules' 'avm'
9393
}

utilities/tools/platform/Set-BicepModuleStatusBadgesTable.ps1

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
<#
33
.SYNOPSIS
4-
Update the module features table in the given markdown file
4+
Update the module features table in the given markdown file path
55
66
.DESCRIPTION
7-
Update the module features table in the given markdown file
7+
Update the module features table in the given markdown file path
88
99
.PARAMETER markdownFilePath
1010
Mandatory. The path to the markdown file to update.
@@ -16,9 +16,9 @@ Mandatory. The path to the modules folder.
1616
Mandatory. The path to the root of the repository containing the modules.
1717
1818
.EXAMPLE
19-
Set-BicepModuleStatusBadgesTable -markdownFilePath 'bicep-features-table.md' -ModulesFolderPath 'bicep-registry-modules/avm/res' -ModulesRepoRootPath 'bicep-registry-modules'
19+
Set-BicepModuleStatusBadgesTable -markdownFilePath 'bicepBadges.md' -ModulesFolderPath 'bicep-registry-modules/avm/res' -ModulesRepoRootPath 'bicep-registry-modules'
2020
21-
Update the file 'bicep-features-table.md' based on the modules in path 'bicep-registry-modules/avm/res'
21+
Update the file 'bicepBadges.md' based on the modules in path 'bicep-registry-modules/avm/res'
2222
#>
2323
function Set-BicepModuleStatusBadgesTable {
2424

@@ -35,11 +35,7 @@ function Set-BicepModuleStatusBadgesTable {
3535
)
3636

3737
# Load external functions
38-
. (Join-Path $PSScriptRoot 'helper' 'Merge-FileWithNewContent.ps1')
3938
. (Join-Path $PSScriptRoot 'helper' 'Get-ModulesFeatureOutline.ps1')
40-
41-
# Logic
42-
$originalContentArray = Get-Content -Path $markdownFilePath
4339

4440
$functionInput = @{
4541
ModulesFolderPath = $ModulesFolderPath
@@ -48,16 +44,14 @@ function Set-BicepModuleStatusBadgesTable {
4844
OnlyTopLevel = $true
4945
ColumnsToInclude = @( 'Status' )
5046
}
51-
$featureTableString = Get-ModulesFeatureOutline @functionInput -Verbose
52-
53-
$newContent = Merge-FileWithNewContent -oldContent $originalContentArray -newContent $featureTableString.TrimEnd() -sectionStartIdentifier '# Feature table' -contentType 'table'
47+
$badgesMarkdown = Get-ModulesFeatureOutline @functionInput -Verbose
5448

5549
Write-Verbose 'New content:'
5650
Write-Verbose '============'
57-
Write-Verbose ($newContent | Out-String)
51+
Write-Verbose ($badgesMarkdown | Out-String)
5852

5953
if ($PSCmdlet.ShouldProcess("File in path [$markdownFilePath]", 'Overwrite')) {
60-
Set-Content -Path $markdownFilePath -Value $newContent -Force
54+
Set-Content -Path $markdownFilePath -Value $badgesMarkdown -Force
6155
Write-Verbose "File [$markdownFilePath] updated" -Verbose
6256
}
6357
}

utilities/tools/platform/helper/Merge-FileWithNewContent.ps1

Lines changed: 0 additions & 241 deletions
This file was deleted.

0 commit comments

Comments
 (0)