Skip to content

Commit

Permalink
Generate_Wiki_Content: Change the order of the tasks (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Aug 14, 2024
1 parent 5bd7ef8 commit 8dad542
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Check for a prefixed and non-prefixed class names [issue #132](https://github.com/dsccommunity/DscResource.DocGenerator/issues/132).
- `azure-pipelines`
- Pin gitversion to V5.
- Update README with the tasks that were not documented.
- `Generate_Wiki_Content`
- Change the order of the tasks to avoid getting and exception when
`source/WikiSource` contain additional markdown files that are copied
to `output/WikiContent`.

## [0.12.4] - 2024-06-03

Expand Down
81 changes: 66 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,42 @@ BuildWorkflow:
- Publish_GitHub_Wiki_Content
```

### `Copy_Source_Wiki_Folder`

This build task will copy the content of the wiki source folder if it exist
(the parameter `WikiSourceFolderName` defaults to `WikiSource`). The wiki
source folder should be located under the source folder, e.g. `source/WikiSource`.
The wiki source folder is meant to contain additional documentation that
will be added to folder `WikiOutput` during build, and then published to
the wiki during the deploy stage (if either the command `Publish-WikiContent`
or the task `Publish_GitHub_Wiki_Content` is used).

if the `Home.md` is present in the folder specified in `WikiSourceFolderName`
it will be copied to `WikiOutput` and all module version placeholders (`#.#.#`)
of the content the file will be replaced with the built module version.

### `Create_Wiki_Output_Folder`

This build task creates the folder `output/WikiContent`.

Below is an example how the build task can be used when a repository is
based on the [Sampler](https://github.com/gaelcolas/Sampler) project.

```yaml
BuildWorkflow:
'.':
- build
docs:
- Create_Wiki_Output_Folder
- Generate_Markdown_For_Public_Commands
- Clean_Markdown_Of_Public_Commands
- Copy_Source_Wiki_Folder
- Generate_Wiki_Sidebar
- Clean_Markdown_Metadata
- Package_Wiki_Content
```

### `Generate_Conceptual_Help`

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

### `Generate_Wiki_Content`

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

The task will also copy the content of the wiki source folder if it exist
(the parameter `WikiSourceFolderName` defaults to `WikiSource`). The wiki
source folder should be located under the source folder, e.g. `source/WikiSource`.
The wiki source folder is meant to contain additional documentation that
will be added to folder `WikiOutput` during build, and then published to
the wiki during the deploy stage (if either the command `Publish-WikiContent`
or the task `Publish_GitHub_Wiki_Content` is used).

if the `Home.md` is present in the folder specified in `WikiSourceFolderName`
it will be copied to `WikiOutput` and all module version placeholders (`#.#.#`)
of the content the file will be replaced with the built module version.

See the command `New-DscResourceWikiPage` for more information.
- `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`

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

### `Generate_Markdown_For_DSC_Resources`

This build task runs the command `New-DscResourceWikiPage` to build
documentation for DSC resources.

See the command `New-DscResourceWikiPage` for more information.

Below is an example how the build task can be used when a repository is
based on the [Sampler](https://github.com/gaelcolas/Sampler) project.

```yaml
BuildWorkflow:
'.':
- build
docs:
- Generate_Conceptual_Help
- Create_Wiki_Output_Folder
- Generate_Markdown_For_DSC_Resources
- Copy_Source_Wiki_Folder
- Package_Wiki_Content
```

### `Generate_Wiki_Sidebar`

This build task runs the command `New-GitHubWikiSidebar` (PlatyPS command) that
Expand Down
2 changes: 1 addition & 1 deletion source/tasks/Generate_Wiki_Content.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ param
$BuildInfo = (property BuildInfo @{ })
)

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
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 comments on commit 8dad542

Please sign in to comment.