The format is based on and uses the types of changes according to Keep a Changelog, and this project adheres to Semantic Versioning.
- Removed
build.psd1
as it is no longer required to build the project. - Removed ClassAst functions
Get-ClassResourceProperty
Get-ClassAst
Get-ClassResourceAst
- Added a devcontainer for development.
- Added private function
ConvertTo-WikiSidebarLinkName
that converts a name to a format suitable for use as a Wiki sidebar link. - New tasks:
Prepare_Markdown_FileNames_For_GitHub_Publish
- This task will prepare the markdown file names for publishing to the GitHub Wiki by replacing hyphens with spaces and converting Unicode hyphens to standard hyphens. It can be controlled by parameterReplaceHyphen
in the task, which defaults to$true
.Clean_WikiContent_For_GitHub_Publish
- This task will remove the top level header from any markdown file where the top level header equals the filename. The task will convert standard hyphens to spaces and Unicode hyphens to standard hyphens before comparison. The task can be controlled by parameterRemoveTopLevelHeader
in the task, which defaults to$true
.
- Added Helper functions as part of [#163] (#163).
Get-ClassPropertyCustomAttribute
Get-DscResourceAttributeProperty
Get-DscPropertyType
Test-ClassPropertyDscAttributeArgument
New-GitHubWikiSidebar
- Replaces ASCII hyphens for the Wiki sidebar.
- Replaces Unicode hyphens with standard hyphens for the Wiki sidebar.
- Task
Generate_Wiki_Content
- Now calls
Prepare_Markdown_FileNames_For_GitHub_Publish
after the markdown files and external help file for command help has been generated. - Now calls
Clean_WikiContent_For_GitHub_Publish
as the last step to remove the top level header from any markdown file where the top level header equals the filename.
- Now calls
- Task
Generate_Markdown_For_Public_Commands
- Verbose output of the markdown files that was created.
- Task
Generate_Markdown_For_DSC_Resources
- Outputs a warning message if the old configuration key is used in the build configuration but keeps using the old configuration key.
New-DscClassResourcePage
- Fix Dockerfile to include GitVersion alias for PowerShell Extension profile script.
- Fix
.vscode/settings.json
file to exclude unrecognized words.
Get-ClassResourceProperty
- Check for a prefixed and non-prefixed class names issue #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 tooutput/WikiContent
.
- Change the order of the tasks to avoid getting and exception when
Generate_Markdown_For_Public_Commands.build
- Now the task will skip if PlatyPS is not available.
Generate_External_Help_File_For_Public_Commands
- Now the task will skip if PlatyPS is not available.
- Now the task will skip if PlatyPS is not available.
Generate_Markdown_For_Public_Commands.build
- Now the task will not try to generate markdown if the module does not have any publicly exported commands (issue #135).
- Now has error handling if the script that is called using the call
operator
&
fails.Generate_External_Help_File_For_Public_Commands
- Now the task will not fail if there are no extern help file generated, which is the case for modules that does not have any publicly exported commands (issue #135).
- Now has error handling if the script that is called using the call
operator
&
fails.
- Task
Package_Wiki_Content
- This task will compress generated documentation into a .zip archive.
- Skipped failing tests on Linux due to libmi.
- Task
Generate_Wiki_Content
converted to a metatask. Existing functionality split into smaller tasks. Fixes (Issue #135)
Remove-EscapedMarkdownCode
- Add additional escape sequences to remove (issue #140).
- Removed the public command
Split-ModuleVersion
since it is now available from the module Sampler.
- Task
Generate_Markdown_For_Public_Commands
- This task will generate markdown documentation for the public commands in the built module. - Task
Generate_External_Help_File_For_Public_Commands
- This task will generate the modules help files to supportGet-Help
for public commands. This task is dependent on the taskGenerate_Markdown_For_Public_Commands
to have been run prior. - Task
Clean_Markdown_Of_Public_Commands
which will edit the the command markdown documentation. For example it will remove theProgressAction
parameter that PlatyPS remove wrongly add (due to a bug). - Task
Clean_Markdown_Metadata
which will remove the markdown metadata block from the markdown documentation. The metadata block was used for other tasks to know what type of content the markdown file contained. - Task
Generate_Wiki_Sidebar
- This task will generate the GitHub Wiki Repository sidebar based on the files present in the built documentation folder (defaults to./output/WikiOutput
). - Public command
Remove-MarkdownMetadataBlock
that removes metadata from a Markdown file. - Public command
New-GitHubWikiSidebar
generate the GitHub Wiki Repository sidebar based on the files present in the built documentation folder (defaults to./output/WikiOutput
). - Private function
Remove-ParameterFromMarkdown
that removes a parameter from a commands markdown documentation. - Private function
Remove-EscapedMarkdownCode
that removes a escape sequences from the markdown documentation (that PlatyPS is making). - Public command
Edit-CommandDocumentation
that will modify the a generated command markdown documentation. - Public command
Add-NewLine
that can add line endings at the end of a file.
- DscResource.DocGenerator
- Updated pipeline files to support resolving dependencies using ModuleFast or PSResourceGet.
- The built module is now removed from the session when initiating a new build. The build pipeline is dogfooding functionality and leaving a previous version imported in the session do not use new code.
- Task
Generate_Wiki_Content
- Support passing metadata trough the build configuration file (
build.yaml
).
- Support passing metadata trough the build configuration file (
New-DscResourceWikiPage
- A new parameter
Metadata
that takes a hashtable of metadata. See comment-based help for the format of the hashtable.
- A new parameter
New-DscClassResourceWikiPage
- A new parameter
Metadata
that takes a hashtable of metadata. See comment-based help for the format of the hashtable.
- A new parameter
New-DscCompositeResourceWikiPage
- A new parameter
Metadata
that takes a hashtable of metadata. See comment-based help for the format of the hashtable.
- A new parameter
New-DscMofResourceWikiPage
- A new parameter
Metadata
that takes a hashtable of metadata. See comment-based help for the format of the hashtable.
- A new parameter
Get-CommentBasedHelp
was fixed so it correctly filters out the comment-based help from a script file.Remove-MarkdownMetadataBlock
was fixed to only remove the metadata block at the top of the file.
Get-ClassResourceProperty
- Regression tests for PR #123.
- Now longer throws an exception if a parent class that isn't part of the module is being used. If a class's source file is not found the class is skipped (fixes issue #127).
Get-ClassResourceProperty
- Now does a more limited wildcard search for the class script file (issue #122).
- Regression tests.
- Updated pipelines files to the latest in Sampler.
- Fix missing verbose message in function
Invoke-Git
. - Fix variable reference for localized strings so they passed HQRM tests.
- Fix statement so function passed HQRM tests.
- Tasks now uses
Set-SamplerTaskVariable
from the module Sampler to set the common build task variables. - Updated task parameters
ProjectName
andSourcePath
to reflect Sampler
- Common task variables have not been set, fixed that.
Get-CompositeSchemaObject
threw an error when a composite did not have comment based help, now returns$null
.
- When
_Sidebar.md
orFooter.md
files already exist in the wiki repo, the code did not override these files. Updated the code to generate these files when they do not exist in the 'WikiSource' folder (fixes issue #108). - When subfolders exist (only for images, not markdown) the Generate_Wiki_Content did not copy these files. Updated the code to copy the files recursively (fixes issue #109).
- Moved to the build images
windows-latest
(fixes issue #112).
- When there is an existing
_Sidebar.md
in the folder 'WikiSource' that is copied to the folder 'WikiContent', it will no longer be overwritten during publish (issue #105). - Fixed failing unit tests for the task
Publish_GitHub_Wiki_Content
. - Rearranged and rephrased some text in the README.md to increase clarity. Previously some documentation applied to a task, but should have applied to the command that the task called.
- Uses latest version of DscResource.Common (fixes SqlServerDsc issue #85).
- Switched to a new Linux build worker for the pipeline.
- Switched to omi-1.6.8-1.ssl_110.ulinux.x64.deb for tests on new Linux image.
- Correctly uses the correct default branch for Codecov.
New-DscMofResourceWikiPage
- Removed unused mandatory parameter (issue #85).
- Added private functions:
Out-GitResult
- DisplaysInvoke-Git
returned hashtable via Write-Verbose and Write-Debug localized messages. Fixes Issue 90Hide-GitToken
- Used to redact the token from the specified git command so that the command can be safely outputted in logs.
Publish-WikiContent
- Restored to original structure.
Invoke-Git
- Added
-PassThru
switch to return result hashtable and not throw regardless of ExitCode value when used. - Throws when ExitCode -ne 0 and
-PassThru
switch not used. - Calls
Out-GitResult
when using-Debug
or-Verbose
.
- Added
- Added private functions:
Get-CompositeResourceSchemaPropertyContent
- Returns markdown for composite resource properties returned byGet-CompositeSchemaObject
.New-DscCompositeResourceWikiPage
- Returns the markdown content for a wiki page for a DSC composite resource.
New-DscResourceWikiPage
- Added support for creating wiki pages for composite resources.
- Added private functions:
Get-ClassAst
- Returns the AST for a single or all classes.Get-ClassResourceAst
- Returns the AST for a single or all DSC class resources.Get-ClassResourceProperty
- Returns DSC class resource properties from the provided class or classes.Format-Text
- Format a string according to predefined options.Get-TemporaryPath
- returns the appropriate temp path for the OS.Get-ConfigurationAst
- Returns the AST for a single or all configurations.Get-CompositeSchemaObject
- Returns an object containing the parameters and other properties related to a composite resource. The object that is returned is different format to a MOF or class-based object and the property names are aligned to a configuration parameter block rather than MOF.Get-CompositeResourceParameterState
- Determines the parameter state of a composite resource parameter. This is a meta attribute that will either beRequired
orWrite
.Get-CompositeResourceParameterValidateSet
- Returns the array of values contained in the ValidateSet parameter attributes if it exists.
- Added QA test to do some quality checks on the module code and change log.
New-DscResourceWikiPage
- If a class-based resource has a parent class that contains DSC resource properties they will now also be returned as part of the DSC resource parameters (issue #62).
- Refactored to split into two private functions
New-DscMofResourceWikiPage
andNew-DscClassResourceWikiPage
.
Get-MofSchemaObject
- Refactored to reduce code duplication when adding functions for supporting composite resources.
Get-ClassResourceCommentBasedHelp
- Renamed this function to
Get-CommentBasedHelp
so that it made sense to use with composite DSC resources. - Enabled the function to extract the comment block if it is not at the top of the script file to support composite resources.
- Renamed this function to
- Updated code to pass newly added quality checks.
Invoke-Git
- Converted to public function.
- Updated to use
System.Diagnostics.Process
for improved error handling. - Returns object, allowing caller to process result.
git
commands no longer use--quiet
to populate returned object.- No longer write a new line to the end of string for the returned properties
StandardOutput
andStandardError
.
Publish_GitHub_Wiki_Content
- Output message if
$GitHubToken
not specified which skips this task. Fixes Issue 75 - Change working folder for the call to
git
with the argumentremote
. - Added optional debug configuration option in
build.yml
.
- Output message if
Invoke-Git
- Set
$TimeOut
to Milliseconds Fixes Issue 84 - Calls
git
so it works on both Windows and Linux. - Output properties in return value if called with the
Debug
optional common parameter.
- Set
Publish-WikiContent
- Remove a unnecessary
Set-Location
so it is possible to remove the temporary folder. - Fixed code style in tests.
- Moved verbose statement so it is only outputted in the right context.
- Fixed bug that prevented the repo to be cloned.
- Remove a unnecessary
- DscResource.DocGenerator
- Adding uploading coverage to Codecov.io.
- DscResource.DocGenerator
- Fixed formatting in the code through out.
- Minor change in code comment.
- Fixed the Tasks to support BuiltModuleDirectory and use new Sampler functions.
- Updated tasks to use the Sampler functions
Get-SamplerProjectName
andGet-SamplerSourcePath
. - Made Sampler a required Modules.
- Updated the
build.yaml
&RequiredModules.psd1
to useSampler.GitHubTasks
for automation.
- Added a new private function
Get-ClassResourceCommentBasedHelp
to get comment-based help from a PowerShell script file. - Added a new private function
Get-ClassResourcePropertyState
to get named attribute argument (from the attribute[DscProperty()]
) for a class-based resource parameter and return the corresponding name used by MOF-based resources. - Added a new private function
Get-ResourceExampleAsMarkdown
that helps to return examples as markdown, and to reduce code duplication. - Added a test helper module
DscResource.DocGenerator.TestHelper.psm1
that contain helper functions for tests.- Added helper function
Out-Diff
that outputs two text strings in hex side-by-side (thanks to @johanringman for help with this one).
- Added helper function
Split-ModuleVersion
- This cmdlet is now exported as a public function because it is required
by the build task
Generate_Wiki_Content
.
- This cmdlet is now exported as a public function because it is required
by the build task
Generate_Wiki_Content
- The Build task
Generate_Wiki_Content
was changed to call the cmdletNew-DscResourceWikiPage
with the correct parameters to support generating documentation for class-based resource (issue #52).
- The Build task
New-DscResourceWikiPage
- Now supports generating wiki documentation for class-based resources (issue #52).
- BREAKING CHANGE: To support class-based resource the parameters were renamed to better recognize what path goes where.
- Each values that are in a
ValueMap
of a MOF schema parameter, or in aValidateSet()
of a class-based resource parameter, will be outputted as markdown inline code.
Get-ResourceExampleAsText
- Comment-based help was updated to reflect the correct parameters.
New-DscResourcePowerShellHelp
- Fixed unit tests to support new private function
Get-ClassResourceCommentBasedHelp
and use the test helper moduleDscResource.DocGenerator.TestHelper.psm1
. - It no longer uses
Recurse
when looking for the module's PowerShell script files. It could potentially lead to that it found resources that are part of common modules in theModules
folder. - Made use of private functions to reduce duplicate code.
- Fixed unit tests to support new private function
Get-DscResourceSchemaPropertyContent
- Fixed the private function so that the description property no longer output an extra whitespace in some circumstances.
- Conceptual help for MOF-based resource works again (broken in v0.7.3) (issue #55).
- Support conceptual help for class-based resources (issue #51).
- Renamed default branch to
main
(issue #49).
- New-WikiFooter
- Fixed
Encoding
, parameter value passed toOut-File
to useascii
rather than[System.Text.Encoding]::ASCII
(issue #45).
- Fixed
- New-WikiSidebar
- Fixed
Encoding
, parameter value passed toOut-File
to useascii
rather than[System.Text.Encoding]::ASCII
(issue #45).
- Fixed
- Set-WikiModuleVersion
- Fixed
Encoding
, parameter value passed toOut-File
to useascii
rather than[System.Text.Encoding]::ASCII
(issue #45).
- Fixed
- Fix the tests for the tasks that recently started failing. The tests
tried to dot-source the task scripts but that is not possible because
they need to be run within the scope of
Invoke-Build
. Instead a new test was added to make sure the task alias is pointing to an existing task script.
- New-DscResourcePowerShellHelp
- Fixed so the cmdlet is case-insensitive when it looks for the README.md file in a resource source folder (issue #42).
- The build task
Generate_Conceptual_Help
can now remove markdown code from the schema MOF parameter descriptions if markdown code is used to improve the Wiki documentation.
- Update README.md with the correct build task name; 'Publish_GitHub_Wiki_Content'.
- Fixed wiki generation to correctly describe embedded instances in parameters and made new section for each embedded instances with their parameters (issue #37).
- The regular expression for
minor-version-bump-message
in the fileGitVersion.yml
was changed to only raise minor version when the commit message contain the wordadd
,adds
,minor
,feature
, orfeatures
.
- Added cmdlet
Publish-WikiContent
that publishes the Wiki content generated by the cmdletNew-DscResourceWikiPage
. - Added build task
Publish_GitHub_Wiki_Content
that can publish content to a GitHub Wiki repository. This task runs the cmdletPublish-WikiContent
. - Added a markdown page
Home.md
to the foldersource/WikiSource
that will be published to the GitHub Wiki for each PR that is merged. The module version number will be updated prior to pushing to the Wiki. This is done by the the build taskPublish_GitHub_Wiki_Content
.
- The parameter
WikiSourcePath
was removed from the functionCopy-WikiFolder
. - The parameter
WikiSourcePath
was removed from the functionPublish-WikiContent
. - The parameter
WikiSourceFolderName
was removed from the build taskPublish_GitHub_Wiki_Content
. - The function
Publish-WikiContent
will no longer call the functionSet-WikiModuleVersion
(it is now done by the taskGenerate_Wiki_Content
).
- Update the documentation style in the README.md.
- The repository is using the latest version of the module ModuleBuilder.
- The repository was pinned to use version 4.10.1 of the module Pester since this repository does not support Pester 5 tests yet.
- Updated
build.ps1
to be able to dogfood build tasks. - Moved the Wiki source logic from
Publish-WikiContent
to the build taskGenerate_Wiki_Content
to align with the other tasks that creates a build artifact that should be deployed.Publish-WikiContent
no longer changes the build artifact during publishing. The build taskGenerate_Wiki_Content
now first generates documentation for any existing DSC resources. Secondly if the Wiki source folder (defaults toWikiSource
) exists in the source folder then the content of that folder will be copied to the Wiki output folder (defaults tooutput/WikiOutput
). If there is a markdown file calledHome.md
then any module version placeholders (#.#.#
) will be replaced by the built module version. - The
Set-WikiModuleVersion
was made a public function to be able to use it in the build taskGenerate_Wiki_Content
.
- Fixed issue with
New-DscResourceWikiPage
where Test-Path was case sensitive on Linux machines and therefore didn't find some Readme.md files. - Minor style and documentation updates to the build tasks
Generate_Wiki_Content
andGenerate_Conceptual_Help
. - Fixed example in comment-based help form cmdlet
New-DscResourceWikiPage
. - Fixed a problem in the build task
Publish_GitHub_Wiki_Content
that made the Wiki output path to not shown correctly.
- Added helper function
Split-ModuleVersion
that is required by the helper functionGet-BuiltModuleVersion
.
- Replaced the helper function
Get-ModuleVersion
with the helper functionGet-BuiltModuleVersion
.
- Fix missing documentation in the README.md for the cmdlet
New-DscResourceWikiPage
and the build taskGenerate_Wiki_Content
(issue #20). - The function
Get-MofSchemaObject
did not correctly create the temporary schema file depending on the formatting of the schema.
-
Added build tasks
Generate_Wiki_Content
(that runs the cmdletNew-DscResourceWikiPage
). The build task is primarily meant to be run by the project Sampler'sbuild.ps1
. To make the task available forInvoke-Build
in a repository that is based on Sampler add this module to required modules, and then in thebuild.yaml
add the following.ModuleBuildTasks: DscResource.DocGenerator: - 'Task.*'
- Fixes the build task
Generate_Conceptual_Help
to use the correct module version folder name for the built module path (issue #17). - Fixes the build task
Generate_Conceptual_Help
to correctly evaluate the module version (issue #21).
-
Added build tasks
Generate_Conceptual_Help
(that runs the cmdletNew-DscResourcePowerShellHelp
). The build task is primarily meant to be run by the project Sampler'sbuild.ps1
. To make the task available forInvoke-Build
in a repository that is based on Sampler add this module to required modules, and then in thebuild.yaml
add the following.ModuleBuildTasks: DscResource.DocGenerator: - 'Task.*'
- Fix the description in the README.md.
- New-DscResourcePowerShellHelp
- Add new parameter
DestinationModulePath
to be able to set the path to a built module (for example) (issue #9).
- Add new parameter
- New-DscResourcePowerShellHelp
- Fixed comment-based help for the parameter
OutputPath
(issue #8).
- Fixed comment-based help for the parameter
- Add cmdlet
New-DscResourcePowerShellHelp
to generate conceptual help for DSC resources. This was moved from repo PowerShell/DscResource.Tests.
- Fixed unit tests to work cross platform.
- Fix status badges in README.md.
- Fix the description in the README.md.