|
96 | 96 |
|
97 | 97 | # find the source code file that matches the markdown file
|
98 | 98 | $scriptPath = Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force | Where-Object { $_.Name -eq ($file.BaseName + '.ps1') }
|
99 |
| - Write-Host " PS1 path: $scriptPath" |
| 99 | + Write-Host " PS1 path: $scriptPath" |
100 | 100 | $docsFilePath = ($scriptPath.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName).Replace('.ps1', '.md')
|
101 |
| - Write-Host " MD path: $docsFilePath" |
| 101 | + Write-Host " MD path: $docsFilePath" |
102 | 102 | $docsFolderPath = Split-Path -Path $docsFilePath -Parent
|
103 | 103 | $null = New-Item -Path $docsFolderPath -ItemType Directory -Force
|
104 | 104 | Move-Item -Path $file.FullName -Destination $docsFilePath -Force
|
105 | 105 | }
|
106 |
| - # Get the MD files that are in the public functions folder and move them to the same place in the docs folder |
| 106 | + |
| 107 | + Write-Host '::group::Build docs - Move markdown files from source files to docs' |
107 | 108 | Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force -Include '*.md' | ForEach-Object {
|
108 | 109 | $file = $_
|
109 | 110 | $relPath = [System.IO.Path]::GetRelativePath($PublicFunctionsFolder.FullName, $file.FullName)
|
110 | 111 | Write-Host " - $relPath"
|
111 | 112 | Write-Host " Path: $file"
|
112 | 113 |
|
113 | 114 | $docsFilePath = ($file.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName)
|
114 |
| - Write-Host " MD path: $docsFilePath" |
| 115 | + Write-Host " MD path: $docsFilePath" |
115 | 116 | $docsFolderPath = Split-Path -Path $docsFilePath -Parent
|
116 | 117 | $null = New-Item -Path $docsFolderPath -ItemType Directory -Force
|
117 | 118 | Move-Item -Path $file.FullName -Destination $docsFilePath -Force
|
118 | 119 | }
|
119 | 120 |
|
| 121 | + Write-Host '────────────────────────────────────────────────────────────────────────────────' |
120 | 122 | Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object {
|
121 | 123 | $fileName = $_.Name
|
122 | 124 | Write-Host "::group:: - [$fileName]"
|
|
0 commit comments