diff --git a/.gitignore b/.gitignore index e3f073ba24ff3..995becdf19bff 100644 --- a/.gitignore +++ b/.gitignore @@ -119,6 +119,7 @@ UpgradeLog*.XML # NuGet packages packages/repositories.config +testPackages # Mac development .DS_Store diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/PublishNugetPackageTests.proj b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/PublishNugetPackageTests.proj index 6cfc7e692f229..0863cb32e7793 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/PublishNugetPackageTests.proj +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/PublishNugetPackageTests.proj @@ -5,7 +5,7 @@ $(LibraryToolsFolder)\Microsoft.WindowsAzure.Build.Tasks\Build.Tasks.Tests\TestPublishProjects $(LibraryRoot)\packages portable;net40;net45 - $(LibraryRoot)\packages\nugetPublish + $(LibraryRoot)\testPackages\nugetPublish 1234 @@ -85,6 +85,7 @@ --> diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/CSProjTestPublish/Class1.cs b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/CSProjTestPublish/Class1.cs index 2e963da0dd3f3..687a47706fd64 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/CSProjTestPublish/Class1.cs +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/CSProjTestPublish/Class1.cs @@ -23,5 +23,7 @@ namespace CSProjTestPublish { public class Class1 { + public void TestMethod1() { } + } } diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/NetCoreTestPublish/Class1.cs b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/NetCoreTestPublish/Class1.cs index 7651587b29a9e..56c423b39f310 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/NetCoreTestPublish/Class1.cs +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectMultiSln/NetCoreTestPublish/Class1.cs @@ -23,7 +23,9 @@ namespace NetCoreTestPublish public class Class1 { public Class1() - { + { } + + public void TestMethod1() { } } } diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_DataPlane/Class1.cs b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_DataPlane/Class1.cs index 99f23ae058791..bc51e2471610c 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_DataPlane/Class1.cs +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_DataPlane/Class1.cs @@ -25,5 +25,7 @@ public class Class1 public Class1() { } + + public void TestMethod1() { } } } diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_MgmtPlane/Class1.cs b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_MgmtPlane/Class1.cs index 71930fcc111f3..b5c897da8d70b 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_MgmtPlane/Class1.cs +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP1_MgmtPlane/Class1.cs @@ -25,5 +25,7 @@ public class Class1 public Class1() { } + + public void TestMethod1() { } } } diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/RP2_SDK.Test/Class1.cs b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/RP2_SDK.Test/Class1.cs index 01500e3864449..e73f980af29af 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/RP2_SDK.Test/Class1.cs +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/RP2_SDK.Test/Class1.cs @@ -25,5 +25,7 @@ public class Class1 public Class1() { } + + public void TestMethod1() { } } } diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/Sdk/Class1.cs b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/Sdk/Class1.cs index dd343b59de0df..f7e947e488617 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/Sdk/Class1.cs +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Build.Tasks.Tests/TestPublishProjects/MultiProjectSingleSln/RP2_Sdk/Sdk/Class1.cs @@ -25,5 +25,7 @@ public class Class1 public Class1() { } + + public void TestMethod1() { } } } diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/FilterOutAutoRestLibraries.cs b/tools/Microsoft.WindowsAzure.Build.Tasks/FilterOutAutoRestLibraries.cs index 49a2faf15a5ab..6cfdae1bde6ed 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/FilterOutAutoRestLibraries.cs +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/FilterOutAutoRestLibraries.cs @@ -31,10 +31,12 @@ public class FilterOutAutoRestLibraries : Task public string AutoRestMark { get; set; } /// - /// Name of packages that needs to be published. Currently for ease of user, it will be space delimited list of NetCore projects + /// Name of packages that needs to be published. Currently for ease for the user, it will be space delimited list of NetCore projects /// Non-NetCore projects cannot be published more than one package due to MSBuild limitation as well as our existing architecture of nuget.proj files - /// Plus once we are very limited set of non-netCore projects, so the effort is not worth. Worse case, each job to publish 1 package at a time - /// E.g. /p:PackageName="PackageName1 PackageName2" string can be passed to publish PacakgeName1 and PackageName2 + /// Plus as we have very limited set of non-netCore projects, so the effort is not worth it. Worse case for publishing non-netCore projects, each job + /// to publish 1 package at a time + /// + /// E.g. for NetCore projects /p:PackageName="PackageName1 PackageName2" string can be passed to publish PacakgeName1 and PackageName2 /// public string NugetPackagesToPublish { get; set; } @@ -56,14 +58,9 @@ public override bool Execute() List nPkgsList = null; - if (NugetPackagesToPublish != null) + if (!string.IsNullOrWhiteSpace(NugetPackagesToPublish)) { - NugetPackagesToPublish = NugetPackagesToPublish.Trim(); - - if (!string.IsNullOrEmpty(NugetPackagesToPublish)) - { - nPkgsList = NugetPackagesToPublish.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries).ToList(); - } + nPkgsList = NugetPackagesToPublish.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries).ToList(); } foreach (ITaskItem solution in AllLibraries) @@ -102,7 +99,9 @@ public override bool Execute() string projectDirName = Path.GetFileName(projectDirPath); string match = nPkgsList.Find((pn) => pn.Equals(projectDirName, System.StringComparison.OrdinalIgnoreCase)); if (!string.IsNullOrEmpty(match)) + { nonNetCoreAutoRestLibraries.Add(solution); + } } else { @@ -161,6 +160,15 @@ public override bool Execute() } } + if(nPkgsList != null) + { + if (nPkgsList.Any()) + { + string pkgNames = string.Join(",", nPkgsList); + Log.LogMessage(MessageImportance.High, "Trying to publish packages: {0}", pkgNames); + } + } + Log.LogMessage(MessageImportance.High, "We have found {0} non netcore autorest libraries.", nonNetCoreAutoRestLibraries.Count); Log.LogMessage(MessageImportance.High, "We have found {0} netcore autorest libraries.", netCoreAutoRestLibraries.Count); Log.LogMessage(MessageImportance.High, "we have found {0} Non autorest libraries.", others.Count); diff --git a/tools/Microsoft.WindowsAzure.Build.Tasks/Microsoft.WindowsAzure.Build.Tasks.csproj b/tools/Microsoft.WindowsAzure.Build.Tasks/Microsoft.WindowsAzure.Build.Tasks.csproj index 15ceafc541958..7a2647f6b879f 100644 --- a/tools/Microsoft.WindowsAzure.Build.Tasks/Microsoft.WindowsAzure.Build.Tasks.csproj +++ b/tools/Microsoft.WindowsAzure.Build.Tasks/Microsoft.WindowsAzure.Build.Tasks.csproj @@ -62,6 +62,9 @@ + + Designer +