Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 1298 (#15988)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Jan 6, 2021
1 parent 7d860f5 commit 4510537
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions eng/common/scripts/copy-docs-to-blobstorage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,22 @@ function Upload-Blobs

LogDebug "Uploading $($PkgName)/$($DocVersion) to $($DocDest)..."
& $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/$($DocVersion)$($SASKey)" --recursive=true --cache-control "max-age=300, must-revalidate"

LogDebug "Handling versioning files under $($DocDest)/$($PkgName)/versioning/"
$versionsObj = (Update-Existing-Versions -PkgName $PkgName -PkgVersion $DocVersion -DocDest $DocDest)

# we can safely assume we have AT LEAST one version here. Reason being we just completed Update-Existing-Versions
$latestVersion = ($versionsObj.SortedVersionArray | Select-Object -First 1).RawVersion

$latestVersion = $versionsObj.LatestGAPackage
if (!$latestVersion) {
$latestVersion = $versionsObj.LatestPreviewPackage
}
LogDebug "Fetching the latest version $latestVersion"

if ($UploadLatest -and ($latestVersion -eq $DocVersion))
{
LogDebug "Uploading $($PkgName) to latest folder in $($DocDest)..."
& $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/latest$($SASKey)" --recursive=true --cache-control "max-age=300, must-revalidate"
}
}


if ($PublishGithubIODocsFn -and (Test-Path "Function:$PublishGithubIODocsFn"))
{
&$PublishGithubIODocsFn -DocLocation $DocLocation -PublicArtifactLocation $PublicArtifactLocation
Expand Down

0 comments on commit 4510537

Please sign in to comment.