From dc8f59e29ba494b4a0a6b10730df5e4048e3c13c Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Fri, 10 Jun 2016 03:16:25 -0500 Subject: [PATCH] Fix the VersionRepoUpdater to handle symbols.nupkg files correctly. --- .../VersionRepoUpdater.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/build_projects/shared-build-targets-utils/VersionRepoUpdater.cs b/build_projects/shared-build-targets-utils/VersionRepoUpdater.cs index e85f4262d..f1906776d 100644 --- a/build_projects/shared-build-targets-utils/VersionRepoUpdater.cs +++ b/build_projects/shared-build-targets-utils/VersionRepoUpdater.cs @@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build { public class VersionRepoUpdater { - private static Regex s_nugetFileRegex = new Regex("^(.*?)\\.(([0-9]+\\.)?[0-9]+\\.[0-9]+(-([A-z0-9-]+))?)\\.nupkg$"); + private static Regex s_nugetFileRegex = new Regex("^(?.*?)\\.(?([0-9]+\\.)?[0-9]+\\.[0-9]+(-(?[A-z0-9-]+))?)(?\\.symbols)?\\.nupkg$"); private string _gitHubAuthToken; private string _gitHubUser; @@ -68,12 +68,16 @@ namespace Microsoft.DotNet.Cli.Build { Match match = s_nugetFileRegex.Match(Path.GetFileName(filePath)); - packages.Add(new NuGetPackageInfo() + // only look for non-symbols packages + if (string.IsNullOrEmpty(match.Groups["symbols"].Value)) { - Id = match.Groups[1].Value, - Version = match.Groups[2].Value, - Prerelease = match.Groups[5].Value, - }); + packages.Add(new NuGetPackageInfo() + { + Id = match.Groups["id"].Value, + Version = match.Groups["version"].Value, + Prerelease = match.Groups["prerelease"].Value, + }); + } } return packages;