Skip to content

Commit

Permalink
Create XML-based help (#14334)
Browse files Browse the repository at this point in the history
* Create XML-based help

* remove xml
  • Loading branch information
dingmeng-xue authored Feb 26, 2021
1 parent 18a8321 commit 21b39ca
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .azure-pipelines/sign-tool-predictor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
14 changes: 14 additions & 0 deletions tools/Az.Tools.Predictor/GenerateHelp.ps1
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions tools/Az.Tools.Predictor/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Target="Build">

<Import Project="$(MSBuildThisFileDirectory)..\..\Repo.props" />
<PropertyGroup>
<PowerShellCoreCommandPrefix>pwsh -NonInteractive -NoLogo -NoProfile -Command</PowerShellCoreCommandPrefix>
</PropertyGroup>

<PropertyGroup>
<Configuration Condition="'$(Configuration)' != 'Release'">Debug</Configuration>
Expand Down Expand Up @@ -31,6 +34,10 @@
<Exec Command="dotnet $(BuildAction) $(ModuleSolutionFile) -c $(Configuration)" />
</Target>

<Target Name="GenerateHelp">
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;.\GenerateHelp -ArtifactFolder $(ArtifactFolder) -ModuleName $(ModuleName)" />
</Target>

<Target Name="Test" DependsOnTargets="Build">
<Message Importance="high" Text="Running check in tests..." />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
Expand Down

0 comments on commit 21b39ca

Please sign in to comment.