From 21b39ca4ec08a9204acc38797537795b22dc49f4 Mon Sep 17 00:00:00 2001 From: Dingmeng Xue Date: Fri, 26 Feb 2021 10:38:47 +0800 Subject: [PATCH] Create XML-based help (#14334) * Create XML-based help * remove xml --- .azure-pipelines/sign-tool-predictor.yml | 2 +- tools/Az.Tools.Predictor/GenerateHelp.ps1 | 14 ++++++++++++++ tools/Az.Tools.Predictor/build.proj | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tools/Az.Tools.Predictor/GenerateHelp.ps1 diff --git a/.azure-pipelines/sign-tool-predictor.yml b/.azure-pipelines/sign-tool-predictor.yml index 504890496afa..e980c5b8f550 100644 --- a/.azure-pipelines/sign-tool-predictor.yml +++ b/.azure-pipelines/sign-tool-predictor.yml @@ -41,7 +41,7 @@ steps: inputs: command: custom custom: msbuild - arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build" /p:Configuration=Release' + arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release' - task: UseDotNet@2 displayName: 'Install DotNet 2.1 Runtime for Signing' diff --git a/tools/Az.Tools.Predictor/GenerateHelp.ps1 b/tools/Az.Tools.Predictor/GenerateHelp.ps1 new file mode 100644 index 000000000000..5cc67611792c --- /dev/null +++ b/tools/Az.Tools.Predictor/GenerateHelp.ps1 @@ -0,0 +1,14 @@ +#Requires -Modules platyPS +[CmdletBinding()] +Param( + [Parameter()] + [string]$ArtifactFolder, + [Parameter()] + [string]$ModuleName +) + +$ModuleFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName +$TempDocFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName'.Doc' +Import-Module $ModuleFolder +New-MarkdownHelp -Module $ModuleName -OutputFolder $TempDocFolder +New-ExternalHelp –Path $TempDocFolder -OutputPath $ModuleFolder \ No newline at end of file diff --git a/tools/Az.Tools.Predictor/build.proj b/tools/Az.Tools.Predictor/build.proj index 190970032a41..33f16e8f62d2 100644 --- a/tools/Az.Tools.Predictor/build.proj +++ b/tools/Az.Tools.Predictor/build.proj @@ -3,6 +3,9 @@ xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Target="Build"> + + pwsh -NonInteractive -NoLogo -NoProfile -Command + Debug @@ -31,6 +34,10 @@ + + + +