Skip to content

Commit 8dad542

Browse files
authored
Generate_Wiki_Content: Change the order of the tasks (#154)
1 parent 5bd7ef8 commit 8dad542

File tree

3 files changed

+72
-16
lines changed

3 files changed

+72
-16
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
- Check for a prefixed and non-prefixed class names [issue #132](https://github.com/dsccommunity/DscResource.DocGenerator/issues/132).
1010
- `azure-pipelines`
1111
- Pin gitversion to V5.
12+
- Update README with the tasks that were not documented.
13+
- `Generate_Wiki_Content`
14+
- Change the order of the tasks to avoid getting and exception when
15+
`source/WikiSource` contain additional markdown files that are copied
16+
to `output/WikiContent`.
1217

1318
## [0.12.4] - 2024-06-03
1419

README.md

+66-15
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,42 @@ BuildWorkflow:
136136
- Publish_GitHub_Wiki_Content
137137
```
138138

139+
### `Copy_Source_Wiki_Folder`
140+
141+
This build task will copy the content of the wiki source folder if it exist
142+
(the parameter `WikiSourceFolderName` defaults to `WikiSource`). The wiki
143+
source folder should be located under the source folder, e.g. `source/WikiSource`.
144+
The wiki source folder is meant to contain additional documentation that
145+
will be added to folder `WikiOutput` during build, and then published to
146+
the wiki during the deploy stage (if either the command `Publish-WikiContent`
147+
or the task `Publish_GitHub_Wiki_Content` is used).
148+
149+
if the `Home.md` is present in the folder specified in `WikiSourceFolderName`
150+
it will be copied to `WikiOutput` and all module version placeholders (`#.#.#`)
151+
of the content the file will be replaced with the built module version.
152+
153+
### `Create_Wiki_Output_Folder`
154+
155+
This build task creates the folder `output/WikiContent`.
156+
157+
Below is an example how the build task can be used when a repository is
158+
based on the [Sampler](https://github.com/gaelcolas/Sampler) project.
159+
160+
```yaml
161+
BuildWorkflow:
162+
'.':
163+
- build
164+
165+
docs:
166+
- Create_Wiki_Output_Folder
167+
- Generate_Markdown_For_Public_Commands
168+
- Clean_Markdown_Of_Public_Commands
169+
- Copy_Source_Wiki_Folder
170+
- Generate_Wiki_Sidebar
171+
- Clean_Markdown_Metadata
172+
- Package_Wiki_Content
173+
```
174+
139175
### `Generate_Conceptual_Help`
140176

141177
This build task runs the command `New-DscResourcePowerShellHelp`.
@@ -304,22 +340,14 @@ BuildWorkflow:
304340

305341
### `Generate_Wiki_Content`
306342

307-
This build task runs the command `New-DscResourceWikiPage` to build
308-
documentation for DSC resources.
343+
This is a metatask that runs the task (in order):
309344

310-
The task will also copy the content of the wiki source folder if it exist
311-
(the parameter `WikiSourceFolderName` defaults to `WikiSource`). The wiki
312-
source folder should be located under the source folder, e.g. `source/WikiSource`.
313-
The wiki source folder is meant to contain additional documentation that
314-
will be added to folder `WikiOutput` during build, and then published to
315-
the wiki during the deploy stage (if either the command `Publish-WikiContent`
316-
or the task `Publish_GitHub_Wiki_Content` is used).
317-
318-
if the `Home.md` is present in the folder specified in `WikiSourceFolderName`
319-
it will be copied to `WikiOutput` and all module version placeholders (`#.#.#`)
320-
of the content the file will be replaced with the built module version.
321-
322-
See the command `New-DscResourceWikiPage` for more information.
345+
- `Create_Wiki_Output_Folder`
346+
- `Generate_Markdown_For_Public_Commands`
347+
- `Generate_External_Help_File_For_Public_Commands`
348+
- `Clean_Markdown_Of_Public_Commands`
349+
- `Generate_Markdown_For_DSC_Resources`
350+
- `Copy_Source_Wiki_Folder`
323351

324352
Below is an example how the build task can be used when a repository is
325353
based on the [Sampler](https://github.com/gaelcolas/Sampler) project.
@@ -337,6 +365,29 @@ BuildWorkflow:
337365
- Generate_Wiki_Content
338366
```
339367

368+
### `Generate_Markdown_For_DSC_Resources`
369+
370+
This build task runs the command `New-DscResourceWikiPage` to build
371+
documentation for DSC resources.
372+
373+
See the command `New-DscResourceWikiPage` for more information.
374+
375+
Below is an example how the build task can be used when a repository is
376+
based on the [Sampler](https://github.com/gaelcolas/Sampler) project.
377+
378+
```yaml
379+
BuildWorkflow:
380+
'.':
381+
- build
382+
383+
docs:
384+
- Generate_Conceptual_Help
385+
- Create_Wiki_Output_Folder
386+
- Generate_Markdown_For_DSC_Resources
387+
- Copy_Source_Wiki_Folder
388+
- Package_Wiki_Content
389+
```
390+
340391
### `Generate_Wiki_Sidebar`
341392

342393
This build task runs the command `New-GitHubWikiSidebar` (PlatyPS command) that

source/tasks/Generate_Wiki_Content.build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ param
8484
$BuildInfo = (property BuildInfo @{ })
8585
)
8686

87-
Task Generate_Wiki_Content Create_Wiki_Output_Folder, Copy_Source_Wiki_Folder, Generate_Markdown_For_DSC_Resources, Generate_Markdown_For_Public_Commands, Generate_External_Help_File_For_Public_Commands, Clean_Markdown_Of_Public_Commands
87+
Task Generate_Wiki_Content Create_Wiki_Output_Folder, Generate_Markdown_For_Public_Commands, Generate_External_Help_File_For_Public_Commands, Clean_Markdown_Of_Public_Commands, Generate_Markdown_For_DSC_Resources, Copy_Source_Wiki_Folder

0 commit comments

Comments
 (0)