From 45247e4d9cdecc3de6979108b4cf301637a47f32 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 14 Dec 2016 09:44:39 -0800 Subject: [PATCH] Update Microsoft.AspNetCore.Routing.DecisionTree.Sources to use contentFiles --- Routing.sln | 14 -------- makefile.shade | 33 +++++++++++++++++++ .../DecisionCriterion.cs | 0 .../DecisionCriterionValue.cs | 0 .../DecisionCriterionValueEqualityComparer.cs | 0 .../DecisionTreeBuilder.cs | 0 .../DecisionTreeNode.cs | 0 .../IClassifier.cs | 0 .../ItemDescriptor.cs | 0 shared/sources.nuspec | 17 ++++++++++ ...NetCore.Routing.DecisionTree.Sources.xproj | 17 ---------- .../project.json | 23 ------------- src/Microsoft.AspNetCore.Routing/project.json | 7 ++-- .../project.json | 7 ++-- 14 files changed, 54 insertions(+), 64 deletions(-) create mode 100644 makefile.shade rename {src => shared}/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterion.cs (100%) rename {src => shared}/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValue.cs (100%) rename {src => shared}/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValueEqualityComparer.cs (100%) rename {src => shared}/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeBuilder.cs (100%) rename {src => shared}/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeNode.cs (100%) rename {src => shared}/Microsoft.AspNetCore.Routing.DecisionTree.Sources/IClassifier.cs (100%) rename {src => shared}/Microsoft.AspNetCore.Routing.DecisionTree.Sources/ItemDescriptor.cs (100%) create mode 100644 shared/sources.nuspec delete mode 100644 src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/Microsoft.AspNetCore.Routing.DecisionTree.Sources.xproj delete mode 100644 src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/project.json diff --git a/Routing.sln b/Routing.sln index e26ce955b4..606af9d412 100644 --- a/Routing.sln +++ b/Routing.sln @@ -19,8 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution global.json = global.json EndProjectSection EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Routing.DecisionTree.Sources", "src\Microsoft.AspNetCore.Routing.DecisionTree.Sources\Microsoft.AspNetCore.Routing.DecisionTree.Sources.xproj", "{ABD5AA59-6000-4A3D-A54F-4B636F725AE8}" -EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Routing.DecisionTree.Sources.Tests", "test\Microsoft.AspNetCore.Routing.DecisionTree.Sources.Tests\Microsoft.AspNetCore.Routing.DecisionTree.Sources.Tests.xproj", "{09C2933C-23AC-41B7-994D-E8A5184A629C}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Routing.Abstractions", "src\Microsoft.AspNetCore.Routing.Abstractions\Microsoft.AspNetCore.Routing.Abstractions.xproj", "{ED253B01-24F1-43D1-AA0B-079391E105A9}" @@ -69,17 +67,6 @@ Global {DB94E647-C73A-4F52-A126-AA7544CCF33B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {DB94E647-C73A-4F52-A126-AA7544CCF33B}.Release|Mixed Platforms.Build.0 = Release|Any CPU {DB94E647-C73A-4F52-A126-AA7544CCF33B}.Release|x86.ActiveCfg = Release|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Debug|x86.ActiveCfg = Debug|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Debug|x86.Build.0 = Debug|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Release|Any CPU.Build.0 = Release|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Release|x86.ActiveCfg = Release|Any CPU - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8}.Release|x86.Build.0 = Release|Any CPU {09C2933C-23AC-41B7-994D-E8A5184A629C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {09C2933C-23AC-41B7-994D-E8A5184A629C}.Debug|Any CPU.Build.0 = Debug|Any CPU {09C2933C-23AC-41B7-994D-E8A5184A629C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -136,7 +123,6 @@ Global {1EE54D32-6CED-4206-ACF5-3DC1DD39D228} = {0E966C37-7334-4D96-AAF6-9F49FBD166E3} {636D79ED-7B32-487C-BDA5-D2A1AAA97371} = {95359B4B-4C85-4B44-A75B-0621905C4CF6} {DB94E647-C73A-4F52-A126-AA7544CCF33B} = {C3ADD55B-B9C7-4061-8AD4-6A70D1AE3B2E} - {ABD5AA59-6000-4A3D-A54F-4B636F725AE8} = {0E966C37-7334-4D96-AAF6-9F49FBD166E3} {09C2933C-23AC-41B7-994D-E8A5184A629C} = {95359B4B-4C85-4B44-A75B-0621905C4CF6} {ED253B01-24F1-43D1-AA0B-079391E105A9} = {0E966C37-7334-4D96-AAF6-9F49FBD166E3} {741B0B05-CE96-473B-B962-6B0A347DF79A} = {95359B4B-4C85-4B44-A75B-0621905C4CF6} diff --git a/makefile.shade b/makefile.shade new file mode 100644 index 0000000000..80c002ac9b --- /dev/null +++ b/makefile.shade @@ -0,0 +1,33 @@ + +var VersionPrefix = '1.2.0' +var VERSION='0.1' +var FULL_VERSION='0.1' +use-standard-lifecycle +k-standard-goals + +#pack-sources target='compile' + @{ + var nugetPath = E("KOREBUILD_NUGET_EXE") ?? ".build/nuget.exe"; + var outputDir = Path.Combine(Directory.GetCurrentDirectory(), "artifacts/build/"); + + var versionSuffix = E("DOTNET_BUILD_VERSION"); + var packageVersion = VersionPrefix; + if (!string.IsNullOrEmpty(versionSuffix)) + { + packageVersion += "-" + versionSuffix; + } + + var sharedDir = Path.Combine(Directory.GetCurrentDirectory(), "shared"); + foreach (var dir in Directory.GetDirectories(sharedDir, "*.Sources")) + { + var id = Path.GetFileName(dir); + NugetPack(nugetPath, + Path.Combine(sharedDir, "sources.nuspec"), + outputDir, + packageVersion, + "-BasePath \"" + dir + "\" -Properties id=" + id); + } + } + +macro name='NugetPack' nugetPath='string' nuspecFile='string' outputDir='string' packageVersion='string' extra='string' + nuget-pack diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterion.cs b/shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterion.cs similarity index 100% rename from src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterion.cs rename to shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterion.cs diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValue.cs b/shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValue.cs similarity index 100% rename from src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValue.cs rename to shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValue.cs diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValueEqualityComparer.cs b/shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValueEqualityComparer.cs similarity index 100% rename from src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValueEqualityComparer.cs rename to shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionCriterionValueEqualityComparer.cs diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeBuilder.cs b/shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeBuilder.cs similarity index 100% rename from src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeBuilder.cs rename to shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeBuilder.cs diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeNode.cs b/shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeNode.cs similarity index 100% rename from src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeNode.cs rename to shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/DecisionTreeNode.cs diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/IClassifier.cs b/shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/IClassifier.cs similarity index 100% rename from src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/IClassifier.cs rename to shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/IClassifier.cs diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/ItemDescriptor.cs b/shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/ItemDescriptor.cs similarity index 100% rename from src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/ItemDescriptor.cs rename to shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/ItemDescriptor.cs diff --git a/shared/sources.nuspec b/shared/sources.nuspec new file mode 100644 index 0000000000..028e90f868 --- /dev/null +++ b/shared/sources.nuspec @@ -0,0 +1,17 @@ + + + + $id$ + $version$ + Microsoft + false + $id$ + true + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/Microsoft.AspNetCore.Routing.DecisionTree.Sources.xproj b/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/Microsoft.AspNetCore.Routing.DecisionTree.Sources.xproj deleted file mode 100644 index bf5ee522c2..0000000000 --- a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/Microsoft.AspNetCore.Routing.DecisionTree.Sources.xproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - abd5aa59-6000-4a3d-a54f-4b636f725ae8 - .\obj - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/project.json b/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/project.json deleted file mode 100644 index 37a653cbaa..0000000000 --- a/src/Microsoft.AspNetCore.Routing.DecisionTree.Sources/project.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "description": "Components for building a DecisionTree.", - "version": "1.2.0-*", - "packOptions": { - "repository": { - "type": "git", - "url": "git://github.com/aspnet/routing" - } - }, - "buildOptions": { - "warningsAsErrors": true, - "keyFile": "../../tools/Key.snk" - }, - "shared": "**/*.cs", - "frameworks": { - "net451": {}, - "netstandard1.3": { - "dependencies": { - "NETStandard.Library": "1.6.1-*" - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Routing/project.json b/src/Microsoft.AspNetCore.Routing/project.json index 321101ae2b..2f3c5cd753 100644 --- a/src/Microsoft.AspNetCore.Routing/project.json +++ b/src/Microsoft.AspNetCore.Routing/project.json @@ -17,17 +17,14 @@ "nowarn": [ "CS1591" ], - "xmlDoc": true + "xmlDoc": true, + "compile": "../../shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/**/*.cs" }, "dependencies": { "Microsoft.AspNetCore.Http.Extensions": "1.2.0-*", "Microsoft.AspNetCore.Routing.Abstractions": { "target": "project" }, - "Microsoft.AspNetCore.Routing.DecisionTree.Sources": { - "type": "build", - "target": "project" - }, "Microsoft.Extensions.HashCodeCombiner.Sources": { "type": "build", "version": "1.2.0-*" diff --git a/test/Microsoft.AspNetCore.Routing.DecisionTree.Sources.Tests/project.json b/test/Microsoft.AspNetCore.Routing.DecisionTree.Sources.Tests/project.json index cd12460922..5b8b7e5cc5 100644 --- a/test/Microsoft.AspNetCore.Routing.DecisionTree.Sources.Tests/project.json +++ b/test/Microsoft.AspNetCore.Routing.DecisionTree.Sources.Tests/project.json @@ -1,14 +1,11 @@ { "buildOptions": { - "warningsAsErrors": true + "warningsAsErrors": true, + "compile": "../../shared/Microsoft.AspNetCore.Routing.DecisionTree.Sources/**/*.cs" }, "dependencies": { "dotnet-test-xunit": "2.2.0-*", "Microsoft.AspNetCore.Routing": "1.2.0-*", - "Microsoft.AspNetCore.Routing.DecisionTree.Sources": { - "type": "build", - "version": "1.2.0-*" - }, "Microsoft.AspNetCore.Testing": "1.2.0-*", "xunit": "2.2.0-*" },