From 17a0ad54199342abbf0778b86032f23c84b73931 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 23 Oct 2022 21:03:56 -0700 Subject: [PATCH] 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 --- eng/common/scripts/Update-DocsMsToc.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Update-DocsMsToc.ps1 b/eng/common/scripts/Update-DocsMsToc.ps1 index 5287d31575..cacc6dbf93 100644 --- a/eng/common/scripts/Update-DocsMsToc.ps1 +++ b/eng/common/scripts/Update-DocsMsToc.ps1 @@ -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) }