Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create XML-based help #14334

Merged
merged 2 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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