Skip to content

Commit

Permalink
allow configuration of a suffix for each config item. (#14113)
Browse files Browse the repository at this point in the history
Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
  • Loading branch information
azure-sdk and scbedd authored Jan 8, 2021
1 parent 862b4d3 commit 22ac5a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions eng/common/scripts/update-docs-ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ $targets = ($Configs | ConvertFrom-Json).targets
# mode:
# monikerid:
# content_folder:
# suffix:
#}

$apiUrl = "https://api.github.com/repos/$repoId"
Expand Down
6 changes: 5 additions & 1 deletion eng/common/scripts/update-docs-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,17 @@ $targets = ($Configs | ConvertFrom-Json).targets
foreach ($config in $targets) {
if ($config.mode -eq "Preview") { $includePreview = $true } else { $includePreview = $false }
$pkgsFiltered = $pkgs | ? { $_.IsPrerelease -eq $includePreview}
$suffix = ""
if ($config.suffix) {
$suffix = $config.suffix
}

if ($pkgsFiltered) {
Write-Host "Given the visible artifacts, $($config.mode) Readme updates against $($config.path_to_config) will be processed for the following packages."
Write-Host ($pkgsFiltered | % { $_.PackageId + " " + $_.PackageVersion })

foreach ($packageInfo in $pkgsFiltered) {
$readmeName = "$($packageInfo.PackageId.Replace('azure-','').Replace('Azure.', '').Replace('@azure/', '').ToLower())-readme.md"
$readmeName = "$($packageInfo.PackageId.Replace('azure-','').Replace('Azure.', '').Replace('@azure/', '').ToLower())-readme${suffix}.md"
$readmeFolder = Join-Path $DocRepoLocation $config.content_folder
$readmeLocation = Join-Path $readmeFolder $readmeName

Expand Down

0 comments on commit 22ac5a6

Please sign in to comment.