Skip to content

Commit 6b49b2c

Browse files
authored
Copy about_az.help.txt into en-US culture folder (Azure#16473)
* add about_az.help.txt into en-US culture folder * polish doc
1 parent 2b57afb commit 6b49b2c

File tree

8 files changed

+153
-3
lines changed

8 files changed

+153
-3
lines changed

build.proj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
Runs tests
1010
/t:Publish
1111
Creates local nuget packages and MSI
12+
/t:CopyAboutTopics
13+
Copys about topics to culture folders
1214
1315
# Properties
1416
/p:CodeSign=True
@@ -216,6 +218,12 @@
216218
<Error Text="BinScope or PoliCheck failed. Please check the files in artifacts/BinScope, or Severity 1 issues in artifacts/PoliCheck-Scan.html" />
217219
</Target>
218220

221+
<!-- Copy about topics to culture folders -->
222+
<Target Name="CopyAboutTopics" Condition="'$(SkipHelp)' == 'false'">
223+
<Message Importance="high" Text="Copying about topics to culture folders..." />
224+
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;Set-Variable -Name ProgressPreference -Value 'SilentlyContinue';. $(RepoTools)/Docs/CopyAboutTopics.ps1 -BuildConfig $(Configuration)&quot;" />
225+
</Target>
226+
219227
<Target Name="GenerateHelp" Condition="'$(SkipHelp)' == 'false'">
220228
<Message Importance="high" Text="Running help generation..." />
221229
<MakeDir Directories="$(StaticAnalysisOutputDirectory)" />
@@ -225,7 +233,7 @@
225233
</Target>
226234

227235
<!-- Everything except Publish -->
228-
<Target Name="Full" DependsOnTargets="Clean;Build;OnPremChecks;GenerateHelp;StaticAnalysis;Test" />
236+
<Target Name="Full" DependsOnTargets="Clean;Build;OnPremChecks;CopyAboutTopics;GenerateHelp;StaticAnalysis;Test" />
229237

230238
<Target Name="StaticAnalysisBreakingChange" Condition="'$(RunStaticAnalysis)' == 'true'" DependsOnTargets="Build">
231239
<Message Importance="high" Text="Running static analysis for breaking change..." />
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
About topic for Azure PowerShell - about_az
2+
3+
TOPIC
4+
5+
about_Az
6+
7+
SHORT DESCRIPTION
8+
9+
The Azure Az PowerShell module is a set of cmdlets for managing Azure
10+
resources directly from the PowerShell command line and in PowerShell
11+
scripts.
12+
13+
LONG DESCRIPTION
14+
15+
Azure PowerShell provides cross-platform cmdlets for managing Azure
16+
services. All Azure PowerShell cmdlets work on Windows PowerShell 5.1 and
17+
supported versions of PowerShell 7.
18+
19+
The Azure PowerShell cmdlets follow the naming convention {verb}-Az{noun}.
20+
21+
- {verb} is an approved PowerShell verb reflecting the corresponding HTTP
22+
operation.
23+
24+
- {noun} matches or has a close equivalent to the name of the resource.
25+
26+
The cmdlets produce .NET objects that can be piped between commands
27+
simplifying the sequencing of commands making Azure PowerShell a powerful
28+
solution for scripting and automation purposes.
29+
30+
A PowerShell module is available for each Azure service. For convenience,
31+
we provide a wrapper module named "Az" that comprises the stable modules.
32+
Modules in preview must be installed independently or via the "AzPreview"
33+
wrapper module.
34+
35+
Azure PowerShell is frequently updated to include bug fixes and service
36+
updates. It is recommended to plan to update to the most recent version
37+
regularly (a minimum of twice a year).
38+
39+
GETTING STARTED
40+
41+
1. Connect to Azure using Connect-AzAccount
42+
43+
2. Run your first command. For example, create a resource group in the
44+
east US region.
45+
46+
New-AzResourceGroup -Name "MyResoureGroup" -location "eastus"
47+
48+
SEE ALSO
49+
50+
Azure PowerShell documentation: https://docs.microsoft.com/powershell/azure
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# About topic for Azure PowerShell - about_az
2+
3+
## TOPIC
4+
5+
about_Az
6+
7+
## SHORT DESCRIPTION
8+
9+
The Azure Az PowerShell module is a set of cmdlets for managing Azure
10+
resources directly from the PowerShell command line and in PowerShell
11+
scripts.
12+
13+
## LONG DESCRIPTION
14+
15+
Azure PowerShell provides cross-platform cmdlets for managing Azure
16+
services. All Azure PowerShell cmdlets work on Windows PowerShell 5.1
17+
and supported versions of PowerShell 7.
18+
19+
The Azure PowerShell cmdlets follow the naming convention
20+
{verb}-Az{noun}.
21+
22+
- {verb} is an approved PowerShell verb reflecting the corresponding
23+
HTTP operation.
24+
25+
- {noun} matches or has a close equivalent to the name of the
26+
resource.
27+
28+
The cmdlets produce .NET objects that can be piped between commands
29+
simplifying the sequencing of commands making Azure PowerShell a
30+
powerful solution for scripting and automation purposes.
31+
32+
A PowerShell module is available for each Azure service. For
33+
convenience, we provide a wrapper module named "Az" that comprises the
34+
stable modules. Modules in preview must be installed independently or
35+
via the "AzPreview" wrapper module.
36+
37+
Azure PowerShell is frequently updated to include bug fixes and service
38+
updates. It is recommended to plan to update to the most recent version
39+
regularly (a minimum of twice a year).
40+
41+
## GETTING STARTED
42+
43+
1. Connect to Azure using `Connect-AzAccount`
44+
45+
2. Run your first command. For example, create a resource group in the
46+
east US region.
47+
```powershell
48+
New-AzResourceGroup -Name "MyResoureGroup" -location "eastus"
49+
```
50+
## SEE ALSO
51+
Azure PowerShell documentation:
52+
https://docs.microsoft.com/powershell/azure

src/Az.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<ItemGroup>
4848
<None Update="Az.$(PsModuleName).psd1" CopyToOutputDirectory="PreserveNewest" />
4949
<None Update="help\*.md" CopyToOutputDirectory="PreserveNewest" />
50+
<None Update="help\About\*.help.txt" CopyToOutputDirectory="PreserveNewest" />
5051
<None Update="*.ps1xml" CopyToOutputDirectory="PreserveNewest" />
5152
</ItemGroup>
5253

tools/CleanupBuild.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ foreach ($path in $outputPaths)
2525

2626
Write-Verbose "Removing markdown help files and folders"
2727
Get-ChildItem -Recurse -Path $path -Include *.md | Remove-Item -Force -Confirm:$false
28-
Get-ChildItem -Directory -Include help -Recurse -Path $path | Remove-Item -Force -Confirm:$false -ErrorAction "Ignore"
28+
Get-ChildItem -Directory -Include help -Recurse -Path $path | Remove-Item -Force -Recurse -Confirm:$false -ErrorAction "Ignore"
2929

3030
Write-Verbose "Removing unneeded web deployment dependencies"
3131
$webdependencies = @("Microsoft.Web.Hosting.dll", "Microsoft.Web.Delegation.dll", "Microsoft.Web.Administration.dll", "Microsoft.Web.Deployment.Tracing.dll")

tools/Docs/CopyAboutTopics.ps1

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[CmdletBinding()]
2+
Param(
3+
[Parameter()]
4+
[string]$BuildConfig = "Release"
5+
)
6+
7+
function CopyAboutTopicsToCultureFolder {
8+
param (
9+
[Parameter(Mandatory = $true, Position = 0)]
10+
[string]$AboutFolder,
11+
[Parameter(Mandatory = $true, Position = 1)]
12+
[string]$CultureFolder
13+
)
14+
Write-Host "Copying about-documents from $AboutFolder to $CultureFolder"
15+
Get-ChildItem -Filter *.help.txt -Path $AboutFolder | Copy-Item -Destination $CultureFolder
16+
}
17+
18+
.($PSScriptRoot + "\..\PreloadToolDll.ps1")
19+
$AboutFolders = Get-ChildItem -Include 'About' -Path "$PSScriptRoot\..\..\artifacts\$BuildConfig" -Recurse -Directory | where { -not [Tools.Common.Utilities.ModuleFilter]::IsAzureStackModule($_.FullName) }
20+
21+
foreach ($AboutFolder in $AboutFolders)
22+
{
23+
$ModuleFolder = $AboutFolder.Parent.Parent.FullName
24+
$CultureFolder = Join-Path -Path $ModuleFolder -ChildPath "en-US"
25+
New-Item -ItemType "directory" -Path $CultureFolder -Force
26+
CopyAboutTopicsToCultureFolder $AboutFolder $CultureFolder
27+
}

tools/Docs/GenerateAboutTopicTxt.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$aboutFileInputFullName = "C:\Azure\azure-powershell\src\Accounts\Accounts\help\About\about_az.md"
2+
$aboutFileOutputFullName = "C:\Azure\azure-powershell\src\Accounts\Accounts\help\About\about_az.help.txt"
3+
4+
$pandocArgs = @(
5+
"--from=gfm",
6+
"--to=plain+multiline_tables",
7+
"--columns=75",
8+
"--output=$aboutFileOutputFullName",
9+
"--quiet"
10+
)
11+
12+
Get-Content $aboutFileInputFullName | pandoc $pandocArgs

tools/HelpGeneration/HelpGeneration.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function Test-AzMarkdownHelp
9191
$HelpFolder = Get-Item $HelpFolderPath
9292
$Exceptions = Import-Csv "$SuppressedExceptionsPath\ValidateHelpIssues.csv"
9393
[String[]]$errors = @()
94-
$MarkdownFiles = Get-ChildItem -Path $HelpFolder
94+
$MarkdownFiles = Get-ChildItem -Path $HelpFolder -Include "*.md"
9595
$ModuleName = ($MarkdownFiles | where { $_.Name -notlike "*-*" }).Name -replace ".md",""
9696
foreach ($file in $MarkdownFiles)
9797
{

0 commit comments

Comments
 (0)