Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 2939 (Azure#23619)
Browse files Browse the repository at this point in the history
* Remove extra files

* Update common.ps1

* Update Update-DocsMsToc.ps1

Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 23, 2022
1 parent eca21a9 commit deb8ac9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions eng/common/scripts/Update-DocsMsToc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,16 @@ $onboardedPackages = &$GetOnboardedDocsMsPackagesFn `
# because we need to generate ToCs for packages which are not necessarily "New"
# in the metadata AND onboard legacy packages (which `Update-DocsMsPackages.ps1`
# does not do)
$metadata = (Get-CSVMetadata).Where({
$_.Package `
-and $onboardedPackages.ContainsKey($_.Package) `
-and $_.Hide -ne 'true'
})
$fullMetadata = Get-CSVMetadata
$metadata = @()
foreach($metadataEntry in $fullMetadata) {
if ($metadataEntry.Package -and $metadataEntry.Hide -ne 'true') {
$pkgKey = GetPackageKey $metadataEntry
if($onboardedPackages.ContainsKey($pkgKey)) {
$metadata += $metadataEntry
}
}
}

$fileMetadata = @()
foreach ($metadataFile in Get-ChildItem "$DocRepoLocation/metadata/*/*.json" -Recurse) {
Expand Down

0 comments on commit deb8ac9

Please sign in to comment.