Skip to content

Commit

Permalink
Update to right var (#27683)
Browse files Browse the repository at this point in the history
  • Loading branch information
sima-zhu authored Mar 16, 2022
1 parent db76081 commit 86326b6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions eng/scripts/docs/Docs-ToC.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@ function Get-java-DocsMsTocData($packageMetadata, $docRepoLocation) {

$children = @()
# Children here combine namespaces in both preview and GA.
if($package.VersionPreview) {
$children += Get-Toc-Children -package $package.Package -groupId $package.GroupId -version $package.VersionPreview `
if($packageMetadata.VersionPreview) {
$children += Get-Toc-Children -package $packageMetadata.Package -groupId $packageMetadata.GroupId -version $packageMetadata.VersionPreview `
-docRepoLocation $docRepoLocation -folderName "preview"
}
if($package.VersionGA) {
$children += Get-Toc-Children -package $package.Package -groupId $package.GroupId -version $package.VersionGA `
if($packageMetadata.VersionGA) {
$children += Get-Toc-Children -package $packageMetadata.Package -groupId $packageMetadata.GroupId -version $packageMetadata.VersionGA `
-docRepoLocation $docRepoLocation -folderName "latest"
}
if (!$children) {
Write-Host "Did not find the package namespaces for $($packageMetadata.GroupId):$($packageMetadata.Package):$version"
if ($packageMetadata.VersionPreview) {
Write-Host "Did not find the package namespaces for $($packageMetadata.GroupId):$($packageMetadata.Package):$($packageMetadata.VersionPreview)"
}
if ($packageMetadata.VersionGA) {
Write-Host "Did not find the package namespaces for $($packageMetadata.GroupId):$($packageMetadata.Package):$($packageMetadata.VersionGA)"
}
}
$output = [PSCustomObject]@{
PackageLevelReadmeHref = "~/docs-ref-services/{moniker}/$packageLevelReadmeName-readme.md"
Expand Down

0 comments on commit 86326b6

Please sign in to comment.