Sync eng/common directory with azure-sdk-tools for PR 4480 (#4046)

* Add extra parameters for .net readme path

* Use another way for default value

* Remove custom source

Co-authored-by: sima-zhu <sizhu@microsoft.com>
This commit is contained in:
Azure SDK Bot 2022-10-23 21:03:56 -07:00 committed by GitHub
parent 5ddcbe8cc0
commit 17a0ad5419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,8 @@ depending on the requirements for the domain
.PARAMETER OutputLocation
Output location for unified reference yml file
.PARAMETER ReadmeFolderRoot
The readme folder root path, use default value here for backward compability. E.g. docs-ref-services in Java, JS, Python, api/overview/azure
#>
param(
@ -36,7 +38,10 @@ param(
[string] $DocRepoLocation,
[Parameter(Mandatory = $true)]
[string] $OutputLocation
[string] $OutputLocation,
[Parameter(Mandatory = $false)]
[string] $ReadmeFolderRoot = 'docs-ref-services'
)
. $PSScriptRoot/common.ps1
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1
@ -208,7 +213,7 @@ foreach ($service in $serviceNameList) {
$serviceReadmeBaseName = $service.ToLower().Replace(' ', '-').Replace('/', '-')
$serviceTocEntry = [PSCustomObject]@{
name = $service;
href = "~/docs-ref-services/{moniker}/$serviceReadmeBaseName.md"
href = "~/$ReadmeFolderRoot/{moniker}/$serviceReadmeBaseName.md"
landingPageType = 'Service'
items = @($packageItems)
}