File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -216,21 +216,22 @@ function Upload-Blobs
216216
217217 LogDebug " Uploading $ ( $PkgName ) /$ ( $DocVersion ) to $ ( $DocDest ) ..."
218218 & $ ($AzCopy ) cp " $ ( $DocDir ) /**" " $ ( $DocDest ) /$ ( $PkgName ) /$ ( $DocVersion ) $ ( $SASKey ) " -- recursive= true -- cache- control " max-age=300, must-revalidate"
219-
219+
220220 LogDebug " Handling versioning files under $ ( $DocDest ) /$ ( $PkgName ) /versioning/"
221221 $versionsObj = (Update-Existing - Versions - PkgName $PkgName - PkgVersion $DocVersion - DocDest $DocDest )
222-
223- # we can safely assume we have AT LEAST one version here. Reason being we just completed Update-Existing-Versions
224- $latestVersion = ($versionsObj.SortedVersionArray | Select-Object - First 1 ).RawVersion
225-
222+ $latestVersion = $versionsObj.LatestGAPackage
223+ if (! $latestVersion ) {
224+ $latestVersion = $versionsObj.LatestPreviewPackage
225+ }
226+ LogDebug " Fetching the latest version $latestVersion "
227+
226228 if ($UploadLatest -and ($latestVersion -eq $DocVersion ))
227229 {
228230 LogDebug " Uploading $ ( $PkgName ) to latest folder in $ ( $DocDest ) ..."
229231 & $ ($AzCopy ) cp " $ ( $DocDir ) /**" " $ ( $DocDest ) /$ ( $PkgName ) /latest$ ( $SASKey ) " -- recursive= true -- cache- control " max-age=300, must-revalidate"
230232 }
231233}
232234
233-
234235if ($PublishGithubIODocsFn -and (Test-Path " Function:$PublishGithubIODocsFn " ))
235236{
236237 & $PublishGithubIODocsFn - DocLocation $DocLocation - PublicArtifactLocation $PublicArtifactLocation
You can’t perform that action at this time.
0 commit comments