From e4e837fa24a9707b657999958b39865fca5cef2c Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 31 Jan 2018 17:08:09 -0800 Subject: [PATCH 1/3] Flatten dependencies of Microsoft.AspNetCore.All metapackage Remove BrowserLink from Microsoft.AspNetCore.App Remove version locking in .All metapackage --- build/SharedFx.targets | 10 +- build/artifacts.props | 286 +++++++++--------- build/repo.targets | 4 +- build/tasks/AddMetapackageReferences.cs | 16 +- .../Microsoft.AspNetCore.All.csproj | 4 - 5 files changed, 164 insertions(+), 156 deletions(-) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index a6aca1bbb0..3c1502a019 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -52,6 +52,7 @@ @@ -67,21 +68,24 @@ <_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)"> MetapackageName=Microsoft.AspNetCore.App; - MetapackageReferenceType=AppMetapackage + MetapackageReferenceType=AppMetapackage; + LockToExactVersions=true <_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)"> MetapackageName=Microsoft.AspNetCore.All; - MetapackageReferenceType=AllMetapackage + MetapackageReferenceType=AllMetapackage; + LockToExactVersions=false <_MetapackageBuilderProject Include="$(MSBuildProjectFullPath)"> MetapackageName=Microsoft.AspNetCore.Analyzers; - MetapackageReferenceType=Analyzer + MetapackageReferenceType=Analyzer; + LockToExactVersions=true diff --git a/build/artifacts.props b/build/artifacts.props index aa7acb7ecc..9d8585acf2 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -28,128 +28,128 @@ - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - + + + + + + - + - - + + - + - - - - + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - + + + - + - + - - + + - - - - + + + + - - - - - - + + + + + + - + - + - - - - - - - + + + + + + + @@ -167,10 +167,10 @@ - + - + @@ -190,9 +190,9 @@ - - - + + + @@ -201,76 +201,76 @@ - - - - + + + + - + - - + + - - + + - + - - + + - - + + - - - - - - + + + + + + - - + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - + - + - - - + + + - + @@ -279,14 +279,14 @@ - + - + - + diff --git a/build/repo.targets b/build/repo.targets index 02cf9ad639..df1859dd07 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -202,8 +202,8 @@ - + diff --git a/build/tasks/AddMetapackageReferences.cs b/build/tasks/AddMetapackageReferences.cs index ea5b700d93..a3e5f78186 100644 --- a/build/tasks/AddMetapackageReferences.cs +++ b/build/tasks/AddMetapackageReferences.cs @@ -18,6 +18,9 @@ namespace RepoTasks [Required] public string MetapackageReferenceType { get; set; } + [Required] + public bool LockToExactVersions { get; set; } + [Required] public ITaskItem[] BuildArtifacts { get; set; } @@ -61,11 +64,14 @@ namespace RepoTasks Log.LogError($"Missing Package: {packageName} from build artifacts"); throw; } - Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: [{packageVersion}]"); + + var packageVersionValue = LockToExactVersions ? $"[{packageVersion}]" : packageVersion; + + Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersionValue}"); var packageReferenceElement = xmlDoc.CreateElement("PackageReference"); packageReferenceElement.SetAttribute("Include", packageName); - packageReferenceElement.SetAttribute("Version", $"[{packageVersion}]"); + packageReferenceElement.SetAttribute("Version", packageVersionValue); packageReferenceElement.SetAttribute("PrivateAssets", "None"); itemGroupElement.AppendChild(packageReferenceElement); @@ -75,11 +81,13 @@ namespace RepoTasks { var packageName = package.ItemSpec; var packageVersion = package.GetMetadata("Version"); - Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: [{packageVersion}]"); + var packageVersionValue = LockToExactVersions ? $"[{packageVersion}]" : packageVersion; + + Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersionValue}"); var packageReferenceElement = xmlDoc.CreateElement("PackageReference"); packageReferenceElement.SetAttribute("Include", packageName); - packageReferenceElement.SetAttribute("Version", $"[{packageVersion}]"); + packageReferenceElement.SetAttribute("Version", packageVersionValue); packageReferenceElement.SetAttribute("PrivateAssets", "None"); itemGroupElement.AppendChild(packageReferenceElement); diff --git a/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj b/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj index 2b1325dd79..252ff6be55 100644 --- a/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj +++ b/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj @@ -28,8 +28,4 @@ - - - - From 3ad022d5a97ce347e3014e61aa2c13acd51dd810 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 1 Feb 2018 12:10:31 -0800 Subject: [PATCH 2/3] Include SpaServices.Extensions in .App and .All metapackages --- build/artifacts.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/artifacts.props b/build/artifacts.props index 9d8585acf2..6c1bad7f21 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -168,7 +168,7 @@ - + From 549d72d9b643b8a0f47eebf6c124dd2d135cd77e Mon Sep 17 00:00:00 2001 From: "ASP.NET CI" Date: Thu, 1 Feb 2018 21:04:43 +0000 Subject: [PATCH 3/3] Updating submodule(s) Templating => 94cfac8ec6abb37bd082d54b3cd737c1fc447767 [auto-updated: submodules] --- modules/Templating | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Templating b/modules/Templating index 7e43fae45d..94cfac8ec6 160000 --- a/modules/Templating +++ b/modules/Templating @@ -1 +1 @@ -Subproject commit 7e43fae45d2176e7a66e0f3d26a2eb0f2fe610ff +Subproject commit 94cfac8ec6abb37bd082d54b3cd737c1fc447767