diff --git a/scripts/dotnet-cli-build/PublishTargets.cs b/scripts/dotnet-cli-build/PublishTargets.cs index 0831f4e81..7ea500295 100644 --- a/scripts/dotnet-cli-build/PublishTargets.cs +++ b/scripts/dotnet-cli-build/PublishTargets.cs @@ -228,7 +228,7 @@ namespace Microsoft.DotNet.Cli.Build { foreach (var file in Directory.GetFiles(Dirs.CorehostLocalPackages, "*.nupkg")) { - var hostBlob = $"{Channel}/Binaries/{CliNuGetVersion}/{Path.GetFileName(file)}"; + var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}"; AzurePublisherTool.PublishFile(hostBlob, file); Console.WriteLine($"Publishing package {hostBlob} to Azure."); } @@ -458,10 +458,7 @@ namespace Microsoft.DotNet.Cli.Build List buildVersions = new List(); - // The corehost packages are published to the CLI version, which is "preview1-xxxxxx" right now. - // But there are -rc2-xxxxxx blobs on Azure, which breaks the sort descending. So only look for - // -p(.*)-xxxxxx for now to ignore those rc2 packages. - Regex buildVersionRegex = new Regex(@"Binaries/(?\d+\.\d+\.\d+-p[^-]+-\d{6})/$"); + Regex buildVersionRegex = new Regex(@"Binaries/(?\d+\.\d+\.\d+-[^-]+-\d{6})/$"); foreach (string file in AzurePublisherTool.ListBlobs(hostBlob)) { diff --git a/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs b/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs index f9f781ca2..c73ac85f7 100644 --- a/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs +++ b/scripts/dotnet-cli-build/Publishing/AzurePublisher.cs @@ -205,15 +205,5 @@ namespace Microsoft.DotNet.Cli.Build } } } - - public IEnumerable ListBlobs(string blobVirtualDirectory) - { - CloudBlobDirectory blobDir = _blobContainer.GetDirectoryReference(blobVirtualDirectory); - BlobContinuationToken continuationToken = new BlobContinuationToken(); - - var blobFiles = blobDir.ListBlobsSegmentedAsync(continuationToken).Result; - - return blobFiles.Results.Select(bf => bf.Uri.AbsoluteUri); - } } }