Permalink
Browse files

Added build cmd to package Nuget and perform tests

I brought in the same pattern we used in Cassette to build and package
the library. This should make it a lot easier to push new versions!
  • Loading branch information...
1 parent 74f5583 commit d3645f8e4f8030d5b77989f7d69dcccebc37b5d4 @kamranayub kamranayub committed Apr 9, 2012
Showing with 8,477 additions and 9,217 deletions.
  1. +11 −11 .gitignore
  2. +120 −0 AttributeRouting.targets
  3. +2,273 −0 SpecResults.txt
  4. +7 −0 build.bat
  5. +67 −0 build.xml
  6. +0 −1 nuget/Build.cmd
  7. BIN nuget/NuGet.exe
  8. +0 −14 nuget/v0.5.3967/AttributeRouting.nuspec
  9. +0 −19 nuget/v0.5.3967/Content/AppStart_AttributeRouting.cs.pp
  10. +0 −7 nuget/v0.5.3967/Content/web.config.transform
  11. +0 −19 nuget/v0.5.3967/LICENSE.txt
  12. BIN nuget/v0.5.3967/lib/net40/AttributeRouting.dll
  13. +0 −83 nuget/v0.5.3967/lib/net40/AttributeRouting.xml
  14. +0 −15 nuget/v0.6.4033/AttributeRouting.nuspec
  15. +0 −19 nuget/v0.6.4033/Content/AppStart_AttributeRouting.cs.pp
  16. +0 −7 nuget/v0.6.4033/Content/web.config.transform
  17. +0 −19 nuget/v0.6.4033/LICENSE.txt
  18. BIN nuget/v0.6.4033/lib/net40/AttributeRouting.dll
  19. +0 −197 nuget/v0.6.4033/lib/net40/AttributeRouting.xml
  20. +0 −15 nuget/v0.7.4119/AttributeRouting.nuspec
  21. +0 −7 nuget/v0.7.4119/Content/web.config.transform
  22. +0 −19 nuget/v0.7.4119/LICENSE.txt
  23. BIN nuget/v0.7.4119/lib/net40/AttributeRouting.dll
  24. BIN nuget/v0.7.4119/lib/net40/AttributeRouting.pdb
  25. +0 −394 nuget/v0.7.4119/lib/net40/AttributeRouting.xml
  26. +0 −17 nuget/v0.8/AttributeRouting.nuspec
  27. +0 −7 nuget/v0.8/Content/web.config.transform
  28. +0 −19 nuget/v0.8/LICENSE.txt
  29. BIN nuget/v0.8/lib/net40/AttributeRouting.dll
  30. BIN nuget/v0.8/lib/net40/AttributeRouting.pdb
  31. +0 −394 nuget/v0.8/lib/net40/AttributeRouting.xml
  32. +0 −17 nuget/v1.0.3808/AttributeRouting.nuspec
  33. +0 −7 nuget/v1.0.3808/Content/web.config.transform
  34. +0 −19 nuget/v1.0.3808/LICENSE.txt
  35. BIN nuget/v1.0.3808/lib/net40/AttributeRouting.dll
  36. BIN nuget/v1.0.3808/lib/net40/AttributeRouting.pdb
  37. +0 −394 nuget/v1.0.3808/lib/net40/AttributeRouting.xml
  38. +0 −17 nuget/v1.0/AttributeRouting.nuspec
  39. +0 −19 nuget/v1.0/Content/App_Start/AttributeRouting.cs.pp
  40. +0 −7 nuget/v1.0/Content/web.config.transform
  41. +0 −19 nuget/v1.0/LICENSE.txt
  42. BIN nuget/v1.0/lib/net40/AttributeRouting.dll
  43. BIN nuget/v1.0/lib/net40/AttributeRouting.pdb
  44. +0 −394 nuget/v1.0/lib/net40/AttributeRouting.xml
  45. +0 −17 nuget/v1.1/AttributeRouting.nuspec
  46. +0 −19 nuget/v1.1/Content/App_Start/AttributeRouting.cs.pp
  47. +0 −7 nuget/v1.1/Content/web.config.transform
  48. +0 −19 nuget/v1.1/LICENSE.txt
  49. BIN nuget/v1.1/lib/net40/AttributeRouting.dll
  50. BIN nuget/v1.1/lib/net40/AttributeRouting.pdb
  51. +0 −394 nuget/v1.1/lib/net40/AttributeRouting.xml
  52. +0 −17 nuget/v1.2.1/AttributeRouting.nuspec
  53. +0 −19 nuget/v1.2.1/Content/App_Start/AttributeRouting.cs.pp
  54. +0 −7 nuget/v1.2.1/Content/web.config.transform
  55. +0 −19 nuget/v1.2.1/LICENSE.txt
  56. BIN nuget/v1.2.1/lib/net40/AttributeRouting.dll
  57. BIN nuget/v1.2.1/lib/net40/AttributeRouting.pdb
  58. +0 −394 nuget/v1.2.1/lib/net40/AttributeRouting.xml
  59. +0 −17 nuget/v1.2/AttributeRouting.nuspec
  60. +0 −19 nuget/v1.2/Content/App_Start/AttributeRouting.cs.pp
  61. +0 −7 nuget/v1.2/Content/web.config.transform
  62. +0 −19 nuget/v1.2/LICENSE.txt
  63. BIN nuget/v1.2/lib/net40/AttributeRouting.dll
  64. BIN nuget/v1.2/lib/net40/AttributeRouting.pdb
  65. +0 −394 nuget/v1.2/lib/net40/AttributeRouting.xml
  66. +0 −17 nuget/v1.3.1/AttributeRouting.nuspec
  67. +0 −19 nuget/v1.3.1/Content/App_Start/AttributeRouting.cs.pp
  68. +0 −7 nuget/v1.3.1/Content/web.config.transform
  69. +0 −19 nuget/v1.3.1/LICENSE.txt
  70. BIN nuget/v1.3.1/lib/net40/AttributeRouting.dll
  71. BIN nuget/v1.3.1/lib/net40/AttributeRouting.pdb
  72. +0 −401 nuget/v1.3.1/lib/net40/AttributeRouting.xml
  73. +0 −17 nuget/v1.3.2/AttributeRouting.nuspec
  74. +0 −19 nuget/v1.3.2/Content/App_Start/AttributeRouting.cs.pp
  75. +0 −7 nuget/v1.3.2/Content/web.config.transform
  76. +0 −19 nuget/v1.3.2/LICENSE.txt
  77. BIN nuget/v1.3.2/lib/net40/AttributeRouting.dll
  78. BIN nuget/v1.3.2/lib/net40/AttributeRouting.pdb
  79. +0 −407 nuget/v1.3.2/lib/net40/AttributeRouting.xml
  80. +0 −17 nuget/v1.3/AttributeRouting.nuspec
  81. +0 −19 nuget/v1.3/Content/App_Start/AttributeRouting.cs.pp
  82. +0 −7 nuget/v1.3/Content/web.config.transform
  83. +0 −19 nuget/v1.3/LICENSE.txt
  84. BIN nuget/v1.3/lib/net40/AttributeRouting.dll
  85. BIN nuget/v1.3/lib/net40/AttributeRouting.pdb
  86. +0 −408 nuget/v1.3/lib/net40/AttributeRouting.xml
  87. +0 −17 nuget/v1.4/AttributeRouting.nuspec
  88. +0 −19 nuget/v1.4/Content/App_Start/AttributeRouting.cs.pp
  89. +0 −7 nuget/v1.4/Content/web.config.transform
  90. +0 −19 nuget/v1.4/LICENSE.txt
  91. BIN nuget/v1.4/lib/net40/AttributeRouting.dll
  92. BIN nuget/v1.4/lib/net40/AttributeRouting.pdb
  93. +0 −430 nuget/v1.4/lib/net40/AttributeRouting.xml
  94. +0 −17 nuget/v1.5.0.2179/AttributeRouting.nuspec
  95. +0 −19 nuget/v1.5.0.2179/Content/App_Start/AttributeRouting.cs.pp
  96. +0 −7 nuget/v1.5.0.2179/Content/web.config.transform
  97. +0 −19 nuget/v1.5.0.2179/LICENSE.txt
  98. BIN nuget/v1.5.0.2179/lib/net40/AttributeRouting.dll
  99. BIN nuget/v1.5.0.2179/lib/net40/AttributeRouting.pdb
  100. +0 −675 nuget/v1.5.0.2179/lib/net40/AttributeRouting.xml
  101. +0 −17 nuget/v1.5.4426/AttributeRouting.nuspec
  102. +0 −19 nuget/v1.5.4426/Content/App_Start/AttributeRouting.cs.pp
  103. +0 −7 nuget/v1.5.4426/Content/web.config.transform
  104. +0 −19 nuget/v1.5.4426/LICENSE.txt
  105. BIN nuget/v1.5.4426/lib/net40/AttributeRouting.dll
  106. BIN nuget/v1.5.4426/lib/net40/AttributeRouting.pdb
  107. +0 −680 nuget/v1.5.4426/lib/net40/AttributeRouting.xml
  108. +0 −17 nuget/v1.5/AttributeRouting.nuspec
  109. +0 −19 nuget/v1.5/Content/App_Start/AttributeRouting.cs.pp
  110. +0 −7 nuget/v1.5/Content/web.config.transform
  111. +0 −19 nuget/v1.5/LICENSE.txt
  112. BIN nuget/v1.5/lib/net40/AttributeRouting.dll
  113. BIN nuget/v1.5/lib/net40/AttributeRouting.pdb
  114. +0 −675 nuget/v1.5/lib/net40/AttributeRouting.xml
  115. +0 −17 nuget/v1.6.0/AttributeRouting.nuspec
  116. +0 −19 nuget/v1.6.0/Content/App_Start/AttributeRouting.cs.pp
  117. +0 −7 nuget/v1.6.0/Content/web.config.transform
  118. +0 −19 nuget/v1.6.0/LICENSE.txt
  119. BIN nuget/v1.6.0/lib/net40/AttributeRouting.dll
  120. BIN nuget/v1.6.0/lib/net40/AttributeRouting.pdb
  121. +0 −697 nuget/v1.6.0/lib/net40/AttributeRouting.xml
  122. +0 −17 nuget/v1.7/AttributeRouting.nuspec
  123. +0 −19 nuget/v1.7/Content/App_Start/AttributeRouting.cs.pp
  124. +0 −7 nuget/v1.7/Content/web.config.transform
  125. +0 −19 nuget/v1.7/LICENSE.txt
  126. BIN nuget/v1.7/lib/net40/AttributeRouting.dll
  127. BIN nuget/v1.7/lib/net40/AttributeRouting.pdb
  128. +0 −711 nuget/v1.7/lib/net40/AttributeRouting.xml
  129. +12 −0 src/AttributeRouting.Shared.nuspec
  130. +10 −14 src/AttributeRouting.Specs/AttributeRouting.Specs.csproj
  131. +1 −1 src/AttributeRouting.Specs/Steps/LoggingSteps.cs
  132. +4 −4 src/AttributeRouting.Specs/packages.config
  133. +20 −0 src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.SelfHost.nuspec
  134. +24 −0 src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.SelfHost.symbols.nuspec
  135. +3 −0 src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.Web.Http.SelfHost.csproj
  136. +21 −0 src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.WebApi.Hosted.nuspec
  137. +15 −0 src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.WebApi.Hosted.nutrans
  138. +25 −0 src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.WebApi.Hosted.symbols.nuspec
  139. +9 −0 src/AttributeRouting.Web.Http.SelfHost/AttributeRouting.WebApi.Hosted.symbols.nutrans
  140. +7 −5 {nuget/v1.0.3808/Content/App_Start → src/AttributeRouting.Web.Http.SelfHost}/AttributeRouting.cs.pp
  141. +4 −0 src/AttributeRouting.Web.Http.WebHost/AttributeRouting.Web.Http.WebHost.csproj
  142. +26 −0 src/AttributeRouting.Web.Http.WebHost/AttributeRouting.WebApi.nuspec
  143. +20 −0 src/AttributeRouting.Web.Http.WebHost/AttributeRouting.WebApi.nutrans
  144. +31 −0 src/AttributeRouting.Web.Http.WebHost/AttributeRouting.WebApi.symbols.nuspec
  145. +10 −0 src/AttributeRouting.Web.Http.WebHost/AttributeRouting.WebApi.symbols.nutrans
  146. +25 −0 src/AttributeRouting.Web.Http.WebHost/AttributeRouting.WebHost.nuspec
  147. +30 −0 src/AttributeRouting.Web.Http.WebHost/AttributeRouting.WebHost.symbols.nuspec
  148. +7 −5 ...p_Start/AttributeRouting.cs.pp → src/AttributeRouting.Web.Http.WebHost/AttributeRoutingHttp.cs.pp
  149. +12 −0 src/AttributeRouting.Web.Http.WebHost/web.config.transform
  150. +24 −0 src/AttributeRouting.Web.Mvc/AttributeRouting.Mvc.nuspec
  151. +28 −0 src/AttributeRouting.Web.Mvc/AttributeRouting.Mvc.symbols.nuspec
  152. +6 −1 src/AttributeRouting.Web.Mvc/AttributeRouting.Web.Mvc.csproj
  153. 0 {nuget/v0.7.4119/Content/App_Start → src/AttributeRouting.Web.Mvc}/AttributeRouting.cs.pp
  154. +25 −0 src/AttributeRouting.Web.Mvc/AttributeRouting.nuspec
  155. +19 −0 src/AttributeRouting.Web.Mvc/AttributeRouting.nutrans
  156. +29 −0 src/AttributeRouting.Web.Mvc/AttributeRouting.symbols.nuspec
  157. +9 −0 src/AttributeRouting.Web.Mvc/AttributeRouting.symbols.nutrans
  158. +12 −0 src/AttributeRouting.Web.Mvc/web.config.transform
  159. +1 −0 src/AttributeRouting.sln
  160. +1 −1 src/SharedAssemblyInfo.cs
  161. BIN tools/lib/Images/Ellipsis.gif
  162. BIN tools/lib/Images/Tree/Circles/Failure.jpg
  163. BIN tools/lib/Images/Tree/Circles/Ignored.jpg
  164. BIN tools/lib/Images/Tree/Circles/Inconclusive.jpg
  165. BIN tools/lib/Images/Tree/Circles/Skipped.jpg
  166. BIN tools/lib/Images/Tree/Circles/Success.jpg
  167. BIN tools/lib/Images/Tree/Classic/Failure.jpg
  168. BIN tools/lib/Images/Tree/Classic/Ignored.jpg
  169. BIN tools/lib/Images/Tree/Classic/Inconclusive.jpg
  170. BIN tools/lib/Images/Tree/Classic/Skipped.jpg
  171. BIN tools/lib/Images/Tree/Classic/Success.jpg
  172. BIN tools/lib/Images/Tree/Default/Failure.png
  173. BIN tools/lib/Images/Tree/Default/Ignored.png
  174. BIN tools/lib/Images/Tree/Default/Inconclusive.png
  175. BIN tools/lib/Images/Tree/Default/Skipped.png
  176. BIN tools/lib/Images/Tree/Default/Success.png
  177. BIN tools/lib/Images/Tree/Visual Studio/Failure.png
  178. BIN tools/lib/Images/Tree/Visual Studio/Ignored.png
  179. BIN tools/lib/Images/Tree/Visual Studio/Inconclusive.png
  180. BIN tools/lib/Images/Tree/Visual Studio/SeriousWarning.png
  181. BIN tools/lib/Images/Tree/Visual Studio/Skipped.png
  182. BIN tools/lib/Images/Tree/Visual Studio/Success.png
  183. BIN tools/lib/Images/pinned.gif
  184. BIN tools/lib/Images/unpinned.gif
  185. BIN tools/lib/NSubstitute.dll
  186. +85 −0 tools/lib/NSubstitute.xml
  187. BIN tools/lib/Rhino.Mocks.dll
  188. +5,413 −0 tools/lib/Rhino.Mocks.xml
  189. BIN tools/lib/log4net.dll
  190. BIN tools/lib/nunit-console-runner.dll
  191. BIN tools/lib/nunit-gui-runner.dll
  192. BIN tools/lib/nunit.core.dll
  193. BIN tools/lib/nunit.core.interfaces.dll
  194. BIN tools/lib/nunit.uiexception.dll
  195. BIN tools/lib/nunit.uikit.dll
  196. BIN tools/lib/nunit.util.dll
  197. BIN tools/nunit-console-x86.exe
  198. +31 −0 tools/nunit-console-x86.exe.config
  199. BIN tools/nunit.framework.dll
View
@@ -1,11 +1,11 @@
-bin/
-obj/
-_ReSharper.*
-*.ReSharper.user
-*.csproj.user
-*.user
-*.suo
-*.cache
-nuget/*.nupkg
-App_Data/
-packages*/
+bin/
+obj/
+_ReSharper.*
+*.ReSharper.user
+*.csproj.user
+*.user
+*.suo
+*.cache
+App_Data/
+packages*/
+build*/
View
@@ -0,0 +1,120 @@
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!-- This task takes in a XDT transform file and transforms it, following any inheritance chain.
+ There should be at least one base transform for this to work; otherwise just use Microsoft's
+ regular TransformXml task.
+
+ See: https://gist.github.com/1918022 -->
+ <!-- EXAMPLE USAGE:
+ <TransformXmlHierarchy
+ Source="some-source.xml"
+ Destination="transformed.xml" />
+ -->
+ <UsingTask
+ TaskName="TransformXmlHierarchy"
+ TaskFactory="CodeTaskFactory"
+ AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
+ <ParameterGroup>
+ <Source Required="true" />
+ <Destination Required="true" />
+ <TaskDirectory Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Using Namespace="System"/>
+ <Using Namespace="System.Linq"/>
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Xml"/>
+ <Using Namespace="System.Reflection" />
+ <Code Type="Fragment" Language="cs">
+<![CDATA[
+var taskPath = Path.Combine(TaskDirectory, "Microsoft.Web.Publishing.Tasks.dll");
+if (!File.Exists(taskPath))
+ throw new Exception("Could not load publishing tasks assembly");
+
+Assembly taskAssembly = Assembly.UnsafeLoadFrom(taskPath);
+
+Func<XmlDocument, string, XmlDocument> transformer = (source, transform) =>
+{
+ dynamic transformation = taskAssembly.CreateInstance(
+ "Microsoft.Web.Publishing.Tasks.XmlTransformation", true, BindingFlags.CreateInstance,
+ null, new object[] { transform }, null, null);
+
+ if (transformation == null)
+ throw new Exception("Could not create instance of XmlTransformation");
+
+ transformation.Apply(source);
+
+ return source;
+};
+
+Func<XmlDocument, string> getParent = (source) =>
+{
+ if (source == null) return null;
+
+ // Build dependency list
+ var nsmgr = new XmlNamespaceManager(source.NameTable);
+ nsmgr.AddNamespace("x", source.DocumentElement.NamespaceURI);
+
+ var attr = source.SelectSingleNode("x:package", nsmgr).Attributes["inherits"];
+
+ return attr == null ? null : attr.Value;
+};
+
+var rootDoc = new XmlDocument();
+var sources = new List<string>();
+var basePath = Path.GetDirectoryName(Source);
+var parent = Path.GetFileName(Source);
+
+if (basePath == null) {
+ throw new Exception("Could not find base directory of path " + Source);
+}
+
+do {
+ sources.Add(parent);
+
+ rootDoc.Load(Path.Combine(basePath, parent));
+
+ parent = getParent(rootDoc);
+
+ if (parent != null) {
+ rootDoc.Load(Path.Combine(basePath, parent));
+ }
+} while (parent != null);
+
+// Reverse chain
+sources.Reverse();
+
+var transformedDoc = sources.Skip(1).Aggregate(rootDoc,
+ (document, transform) => String.IsNullOrEmpty(transform)
+ ? document
+ : transformer(document, Path.Combine(basePath, transform)),
+ (document) => document);
+
+Log.LogMessage(MessageImportance.Normal, "Transformed " + Destination);
+
+transformedDoc.Save(Destination);
+]]>
+ </Code>
+ </Task>
+ </UsingTask>
+ <UsingTask TaskName="GetAssemblyInformationalVersion"
+ TaskFactory="CodeTaskFactory"
+ AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
+ <ParameterGroup>
+ <Assembly ParameterType="System.String" Required="true" />
+ <Version ParameterType="System.String" Output="true" />
+ </ParameterGroup>
+ <Task>
+ <Using Namespace="System"/>
+ <Using Namespace="System.Diagnostics"/>
+ <Code Type="Fragment" Language="cs">
+<![CDATA[
+var version = FileVersionInfo.GetVersionInfo(Assembly);
+
+Version = version.ProductVersion;
+]]>
+ </Code>
+ </Task>
+ </UsingTask>
+</Project>
Oops, something went wrong.

0 comments on commit d3645f8

Please sign in to comment.