Skip to content

Commit 21b39ca

Browse files
authored
Create XML-based help (#14334)
* Create XML-based help * remove xml
1 parent 18a8321 commit 21b39ca

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.azure-pipelines/sign-tool-predictor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ steps:
4141
inputs:
4242
command: custom
4343
custom: msbuild
44-
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build" /p:Configuration=Release'
44+
arguments: 'tools\Az.Tools.Predictor\build.proj /target:"Clean;Build;GenerateHelp" /p:Configuration=Release'
4545

4646
- task: UseDotNet@2
4747
displayName: 'Install DotNet 2.1 Runtime for Signing'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#Requires -Modules platyPS
2+
[CmdletBinding()]
3+
Param(
4+
[Parameter()]
5+
[string]$ArtifactFolder,
6+
[Parameter()]
7+
[string]$ModuleName
8+
)
9+
10+
$ModuleFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName
11+
$TempDocFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName'.Doc'
12+
Import-Module $ModuleFolder
13+
New-MarkdownHelp -Module $ModuleName -OutputFolder $TempDocFolder
14+
New-ExternalHelp –Path $TempDocFolder -OutputPath $ModuleFolder

tools/Az.Tools.Predictor/build.proj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Target="Build">
44

55
<Import Project="$(MSBuildThisFileDirectory)..\..\Repo.props" />
6+
<PropertyGroup>
7+
<PowerShellCoreCommandPrefix>pwsh -NonInteractive -NoLogo -NoProfile -Command</PowerShellCoreCommandPrefix>
8+
</PropertyGroup>
69

710
<PropertyGroup>
811
<Configuration Condition="'$(Configuration)' != 'Release'">Debug</Configuration>
@@ -31,6 +34,10 @@
3134
<Exec Command="dotnet $(BuildAction) $(ModuleSolutionFile) -c $(Configuration)" />
3235
</Target>
3336

37+
<Target Name="GenerateHelp">
38+
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;.\GenerateHelp -ArtifactFolder $(ArtifactFolder) -ModuleName $(ModuleName)" />
39+
</Target>
40+
3441
<Target Name="Test" DependsOnTargets="Build">
3542
<Message Importance="high" Text="Running check in tests..." />
3643
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />

0 commit comments

Comments
 (0)