Closed falkheiland closed 2 years ago
I can't reproduce this error in the PowerShell Integrated Console
C:\source\DscResource.DocGenerator [fix/issue#105]> .\build.ps1 -tasks Update_markdown_help_source
[pre-build] Starting Build Init
[build] Starting build with InvokeBuild.
[build] Parsing defined tasks
[build] Loading Configuration from C:\source\DscResource.DocGenerator\build.yaml
Importing tasks from module Sampler.GitHubTasks
Loading New-Release.GitHub.build.Sampler.GitHubTasks.ib.tasks...
Importing tasks from module Sampler
Loading Build-Module.ModuleBuilder.build.Sampler.ib.tasks...
Loading ChocolateyPackage.build.Sampler.ib.tasks...
Loading Clean.ModuleBuilder.build.Sampler.ib.tasks...
Loading DeployAll.PSDeploy.build.Sampler.ib.tasks...
Loading DscResource.Test.build.Sampler.ib.tasks...
Loading generateHelp.PlatyPS.build.Sampler.ib.tasks...
Loading GuestConfig.build.Sampler.ib.tasks...
Loading Invoke-Pester.pester.build.Sampler.ib.tasks...
Loading JaCoCo.coverage.build.Sampler.ib.tasks...
Loading release.module.build.Sampler.ib.tasks...
Loading Set-BuildEnvironment.BuildHelpers.build.Sampler.ib.tasks...
Loading Set-SamplerTaskVariable...
Adding Workflow from configuration:
+-> test
+-> hqrmtest
+-> publish
+-> merge
+-> pack
+-> build
+-> .
[build] Executing requested workflow: Update_markdown_help_source
Build Update_markdown_help_source C:\source\DscResource.DocGenerator\build.ps1
Redefined task '.'.
===============================================================================
UPDATE MARKDOWN HELP SOURCE
Generate (if absent) or Update the Markdown help source files for each locale folder (i.e. docs/en-US).
-------------------------------------------------------------------------------
/Update_markdown_help_source
C:\source\DscResource.DocGenerator\output\RequiredModules\Sampler\0.112.1\tasks\generateHelp.PlatyPS.build.ps1:126
Project Name = 'DscResource.DocGenerator'
Source Path = 'C:\source\DscResource.DocGenerator\source'
Output Directory = 'C:\source\DscResource.DocGenerator\output'
Release Notes path = 'C:\source\DscResource.DocGenerator\output\ReleaseNotes.md'
Built Module Subdirectory = 'C:\source\DscResource.DocGenerator\output\'
Module Manifest Path (src) = 'C:\source\DscResource.DocGenerator\source\DscResource.DocGenerator.psd1'
Versioned Output Directory = 'True'
Built Module Manifest = 'C:\source\DscResource.DocGenerator\output\DscResource.DocGenerator\0.10.2\DscResource.DocGenerator.psd1'
Built Module Base = 'C:\source\DscResource.DocGenerator\output\DscResource.DocGenerator\0.10.2'
Module Version = '0.10.2-fix0001'
Module Version Folder = '0.10.2'
Pre-release Tag = 'fix0001'
Built Module Root Script = 'C:\source\DscResource.DocGenerator\output\DscResource.DocGenerator\0.10.2\DscResource.DocGenerator.psm1'
Pester Output Folder = 'C:\source\DscResource.DocGenerator\output\testResults
Help Source Folder = 'C:\source\DscResource.DocGenerator\docs'
Help output Folder = 'C:\source\DscResource.DocGenerator\output\help'
Help output Version Folder = 'C:\source\DscResource.DocGenerator\output\help\0.10.2-fix0001'
Help output Culture path = 'C:\source\DscResource.DocGenerator\output\help\0.10.2-fix0001\en-US'
Docs output folder path = 'C:\source\DscResource.DocGenerator\output\docs'
Copy MAML to Built Module = 'True'
No existing help locale folder found. Adding default 'en-US'
Updating help for locale 'en-US'
$env:PSModulePath = 'C:\source\DscResource.DocGenerator\output\RequiredModules;C:\source\DscResource.DocGenerator\output;C:\Users\johan.ljunggren\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;c:\Users\johan.ljunggren\.vscode\extensions\ms-vscode.powershell-2021.12.0\modules'
$targetModule = Import-Module -Name 'DscResource.DocGenerator' -ErrorAction Stop -Passthru
try
{
Update-MarkdownHelpModule -Path 'C:\source\DscResource.DocGenerator\docs\en-US' -Force -ErrorAction 'Stop'
}
catch
{
$newMarkdownHelpParams = @{
Module = 'DscResource.DocGenerator'
OutputFolder = 'C:\source\DscResource.DocGenerator\docs\en-US'
AlphabeticParamsOrder = $True
WithModulePage = $True
ExcludeDontShow = $True
Force = $true
ErrorAction = 'Stop'
Locale = 'en-US'
HelpVersion = '0.10.2-fix0001'
Metadata = @{GeneratedBy = "Sampler update_help_source task"}
}
New-MarkdownHelp @newMarkdownHelpParams
}
$env:PSModulePath = 'C:\source\DscResource.DocGenerator\output\RequiredModules;C:\source\DscResource.DocGenerator\output;C:\Users\johan.ljunggren\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;c:\Users\johan.ljunggren\.vscode\extensions\ms-vscode.powershell-2021.12.0\modules'
$targetModule = Import-Module -Name 'DscResource.DocGenerator' -ErrorAction Stop -Passthru
try
{
Update-MarkdownHelpModule -Path 'C:\source\DscResource.DocGenerator\docs\en-US' -Force -ErrorAction 'Stop'
}
catch
{
$newMarkdownHelpParams = @{
Module = 'DscResource.DocGenerator'
OutputFolder = 'C:\source\DscResource.DocGenerator\docs\en-US'
AlphabeticParamsOrder = $True
WithModulePage = $True
ExcludeDontShow = $True
Force = $true
ErrorAction = 'Stop'
Locale = 'en-US'
HelpVersion = '0.10.2-fix0001'
Metadata = @{GeneratedBy = "Sampler update_help_source task"}
}
New-MarkdownHelp @newMarkdownHelpParams
}
Done /Update_markdown_help_source 00:00:02.9092442
Build succeeded. 1 tasks, 0 errors, 0 warnings 00:00:04.5170263
@falkheiland can you provide more information on how to reproduce this? Do you have a public repo where it possible to reproduce it?
@johlju i tried to recreate the issue, but can not. i have no idea what changed (probably something on my client), but it is working now w/o an error. thanks for the help, the issue can be closed, i think.
Closing this as per previous comment. Please reopen or comment if this happens again, and is reproducible.
Problem description
executing the build.ps1 with tasks Update_markdown_help_source and /or Generate_MAML_from_markdown_help_source does not work.
Verbose logs
How to reproduce
run inside vscode integrated console
Expected behavior
it should work
Current behavior
Error. see verbose logs section.
Suggested solution
https://github.com/gaelcolas/Sampler/blob/a6207e0cb75181a15422d73aac2ba6b7458a3e9e/.build/tasks/generateHelp.PlatyPS.build.ps1#L115
Line 115 should be done diffferently.
Operating system the target node is running
PowerShell version and build the target node is running
Module version used