Permalink
Browse files

Automated build/nuget pack/pub

  • Loading branch information...
1 parent cfcebb2 commit f3e6f41ee13dbbfd48a9ce200b71e9ede943c5eb @benfoster committed Mar 7, 2013
View
@@ -1,28 +1,16 @@
-*.[Cc]ache
-*.csproj.user
-*.[Rr]e[Ss]harper*
-*.sln.cache
-*.suo
-*.user
-*.orig
-*.pidb
-*.userprefs
-AssemblyInfo.cs
-.DS_Store
-deploy/
-build/
-[Bb]in/
-[Dd]ebug/
-[Oo]bj/
-[Rr]elease/
-_[Rr]e[Ss]harper.*/
-*.docstates
-*.tss
-*.ncrunchproject
-*.ncrunchsolution
-*.dotCover
-src/_NCrunch_Nancy/
-src/packages/
-App_Data/
-Raven.Studio.xap
-
+[Oo]bj
+[Bb]in
+*.user
+*.suo
+*.[Cc]ache
+*.bak
+*.ncb
+*.log
+*.DS_Store
+[Tt]humbs.db
+_ReSharper.*
+*.resharper
+Ankh.NoLoad
+tools
+packages
+artifacts
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
+ ToolsVersion="4.0"
+ DefaultTargets="Default">
+
+ <PropertyGroup>
+ <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
+ <SolutionDir Condition="'$(SolutionDir)' == ''">$([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory)))</SolutionDir>
+ <ScriptsDir>$(SolutionDir)\build</ScriptsDir>
+ <NugetExeDir>$(SolutionDir)\src\.nuget</NugetExeDir>
+ <Solutionfile>$(SolutionDir)\src\Fabrik.SimpleBus.sln</Solutionfile>
+ <BuildArtifactsDir>$(SolutionDir)\artifacts</BuildArtifactsDir>
+ <NuGetPackageOutputDir>$(BuildArtifactsDir)\packages</NuGetPackageOutputDir>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <AppProjFiles Include="$(SolutionDir)\src\Fabrik.SimpleBus\Fabrik.SimpleBus.csproj" />
+ <TestProjFiles Include="$(SolutionDir)\src\Fabrik.SimpleBus.Tests\Fabrik.SimpleBus.Tests.csproj" />
+ <NuGetPackageProjects Include="$(SolutionDir)\src\Fabrik.SimpleBus\Fabrik.SimpleBus.csproj" />
+ </ItemGroup>
+
+ <Target Name="Default" DependsOnTargets="Compile; Tests; Package" />
+ <Target Name="DefaultCI" DependsOnTargets="Compile; Tests; Package; PublishPackage" />
+
+ <Target Name="Clean">
+ <RemoveDir Directories="$(BuildArtifactsDir)" />
+ </Target>
+
+ <Target Name="Init" DependsOnTargets="Clean">
+ <MakeDir Directories="$(BuildArtifactsDir);$(NuGetPackageOutputDir)" />
+ </Target>
+
+ <Target Name="Compile" DependsOnTargets="Init">
+ <MSBuild Projects="@(AppProjFiles)" Targets="Rebuild" Properties="OutDir=$(BuildArtifactsDir);Configuration=$(Configuration)" />
+ <MSBuild Projects="@(TestProjFiles)" Targets="Rebuild" Properties="Configuration=Debug">
+ <Output PropertyName="TestProjOutputs" TaskParameter="TargetOutputs" />
+ </MSBuild>
+ </Target>
+
+ <Target Name="Tests" DependsOnTargets="Compile">
+ <PropertyGroup>
+ <NUnitAssemblies>$(TestProjOutputs.Replace(";", " "))</NUnitAssemblies>
+ <NUnitCommand>$(SolutionDir)\src\packages\NUnit.Runners.2.6.2\tools\nunit-console.exe $(NUnitAssemblies)</NUnitCommand>
+ </PropertyGroup>
+ <Message Importance="high" Text="Running Tests with this command: $(NUnitCommand)"/>
+ <Exec Command="$(NUnitCommand)" />
+ </Target>
+
+ <Target Name="Package" DependsOnTargets="Tests">
+ <Exec Command="$(NugetExeDir)\nuget.exe pack %(NuGetPackageProjects.FullPath) -Build -OutputDirectory $(NuGetPackageOutputDir)" />
+ </Target>
+</Project>
View
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--This file represents the results of running a test suite-->
+<test-results name="D:\Data\ben\Projects\OSSProjects\Fabrik.SimpleBus\src\Fabrik.SimpleBus.Tests\bin\Debug\Fabrik.SimpleBus.Tests.dll" total="8" errors="0" failures="0" not-run="0" inconclusive="0" ignored="0" skipped="0" invalid="0" date="2013-03-07" time="10:08:39">
+ <environment nunit-version="2.6.2.12296" clr-version="2.0.50727.6400" os-version="Microsoft Windows NT 6.2.9200.0" platform="Win32NT" cwd="D:\Data\ben\Projects\OSSProjects\Fabrik.SimpleBus\build" machine-name="ZIRCON" user="ben" user-domain="ZIRCON" />
+ <culture-info current-culture="en-GB" current-uiculture="en-GB" />
+ <test-suite type="Assembly" name="D:\Data\ben\Projects\OSSProjects\Fabrik.SimpleBus\src\Fabrik.SimpleBus.Tests\bin\Debug\Fabrik.SimpleBus.Tests.dll" executed="True" result="Success" success="True" time="2.341" asserts="0">
+ <results>
+ <test-suite type="Namespace" name="Fabrik" executed="True" result="Success" success="True" time="2.322" asserts="0">
+ <results>
+ <test-suite type="Namespace" name="SimpleBus" executed="True" result="Success" success="True" time="2.322" asserts="0">
+ <results>
+ <test-suite type="Namespace" name="Tests" executed="True" result="Success" success="True" time="2.322" asserts="0">
+ <results>
+ <test-suite type="TestFixture" name="InProcessBusTests" executed="True" result="Success" success="True" time="2.319" asserts="0">
+ <results>
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Can_send_messages_withut_any_subscribers" executed="True" result="Success" success="True" time="0.173" asserts="0" />
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Can_subscribe_to_complex_types" executed="True" result="Success" success="True" time="0.013" asserts="1" />
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Can_subscribe_to_simple_types" executed="True" result="Success" success="True" time="0.004" asserts="1" />
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Can_unsubscribe_an_existing_handler" executed="True" result="Success" success="True" time="0.020" asserts="2" />
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Cancelling_a_message_should_stop_all_remaining_handlers_from_executing" executed="True" result="Success" success="True" time="2.021" asserts="3" />
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Should_execute_remaining_handlers_on_exception" executed="True" result="Success" success="True" time="0.022" asserts="2" />
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Should_invoke_all_handlers_that_implement_the_message_type" executed="True" result="Success" success="True" time="0.020" asserts="4" />
+ <test-case name="Fabrik.SimpleBus.Tests.InProcessBusTests.Should_invoke_message_handler_factories_per_message" executed="True" result="Success" success="True" time="0.013" asserts="1" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+</test-results>
View
@@ -0,0 +1,7 @@
+param(
+ $buildFile = (join-path (Split-Path -parent $MyInvocation.MyCommand.Definition) "Fabrik.SimpleBus.msbuild"),
+ $buildParams = "/p:Configuration=Release",
+ $buildTarget = "/t:Default"
+)
+
+& "$(get-content env:windir)\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" $buildFile $buildParams $buildTarget
View
@@ -0,0 +1,36 @@
+##################################################
+#resources
+##################################################
+#http://www.powershellpro.com/powershell-tutorial-introduction/powershell-tutorial-conditional-logic/
+#http://technet.microsoft.com/en-us/library/ee176935.aspx
+#http://weblogs.asp.net/soever/archive/2007/02/06/powershell-regerencing-files-relative-to-the-currently-executing-script.aspx
+##################################################
+#resources
+##################################################
+param(
+ $nugetApiKey = "$env:NUGET_API_KEY"
+)
+
+function require-param {
+ param($value, $paramName)
+
+ if($value -eq $null) {
+ write-error "The parameter -$paramName is required."
+ }
+}
+
+
+Write-Host $nugetApiKey
+require-param $nugetApiKey -paramName "nugetApiKey"
+
+#safely find the solutionDir
+$ps1Dir = (Split-Path -parent $MyInvocation.MyCommand.Definition)
+$solutionDir = Split-Path -Path $ps1Dir -Parent
+$nugetExePath = resolve-path(join-path $solutionDir "src\.nuget")
+
+$packages = dir "$solutionDir\artifacts\packages\*.nupkg"
+
+foreach($package in $packages) {
+ #$package is type of System.IO.FileInfo
+ & "$nugetExePath\Nuget.exe" push $package.FullName $nugetApiKey
+}
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="NUnit.Runners" version="2.6.2" />
+</packages>
@@ -0,0 +1,15 @@
+using System.Reflection;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyCompany("Ben Foster")]
+[assembly: AssemblyCopyright("Copyright © Ben Foster 2013")]
+
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: AssemblyConfiguration("")]
+
+[assembly: AssemblyVersion("1.0.1.0")]
+[assembly: AssemblyFileVersion("1.0.1.0")]
+[assembly: AssemblyInformationalVersion("1.0.1-pre")]
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Fabrik.SimpleBus.Demo")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Fabrik.SimpleBus.Demo")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("fef97871-65b1-4244-a7cb-8afcd5b9a4db")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Fabrik.SimpleBus.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Fabrik.SimpleBus.Tests")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("eb8f6721-eab4-42a0-a621-8af6f5f74dde")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
- <metadata>
- <id>Fabrik.SimpleBus</id>
- <version>1.0.0-pre</version>
- <title>Fabrik SimpleBus</title>
- <authors>Ben Foster</authors>
- <owners />
- <licenseUrl>https://github.com/benfoster/Fabrik.SimpleBus/blob/master/LICENSE.md</licenseUrl>
- <projectUrl>https://github.com/benfoster/Fabrik.SimpleBus</projectUrl>
- <requireLicenseAcceptance>false</requireLicenseAcceptance>
- <description>Fabrik.SimpleBus is a simple in-process message bus written in C# that uses TPL Dataflow to provide asynchronous messaging capabilities.</description>
- <copyright>Copyright (c) 2012 Ben Foster, United Kingdom</copyright>
- <dependencies>
- <dependency id="Fabrik.Common" version="1.0.1-pre" />
- <dependency id="Microsoft.Tpl.Dataflow" version="4.5.9" />
- </dependencies>
- </metadata>
- <files>
- <file src="Fabrik.SimpleBus\bin\Debug\Fabrik.SimpleBus.dll" target="lib\net45\Fabrik.SimpleBus.dll" />
- <file src="Fabrik.SimpleBus\bin\Debug\Fabrik.SimpleBus.pdb" target="lib\net45\Fabrik.SimpleBus.pdb" />
- </files>
-</package>
View
@@ -14,6 +14,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fabrik.SimpleBus.Demo", "Fa
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fabrik.SimpleBus.Tests", "Fabrik.SimpleBus.Tests\Fabrik.SimpleBus.Tests.csproj", "{94779924-4502-442C-9F3F-FB6C8E121476}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{4A10ADDA-2AFC-4C48-96E7-53AC284DA401}"
+ ProjectSection(SolutionItems) = preProject
+ Common\CommonAssemblyInfo.cs = Common\CommonAssemblyInfo.cs
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -49,11 +49,15 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Common\CommonAssemblyInfo.cs">
+ <Link>Properties\CommonAssemblyInfo.cs</Link>
+ </Compile>
<Compile Include="BusExtensions.cs" />
<Compile Include="IBus.cs" />
<Compile Include="IHandle.cs" />
<Compile Include="IHandleAsync.cs" />
<Compile Include="InProcessBus.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SendMessageRequest.cs" />
<Compile Include="Subscription.cs" />
</ItemGroup>
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<package >
+ <metadata>
+ <id>$id$</id>
+ <version>$version$</version>
+ <title>$title$</title>
+ <authors>$author$</authors>
+ <owners>$author$</owners>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>$description$</description>
+ <licenseUrl>https://raw.github.com/benfoster/Fabrik.SimpleBus/master/LICENSE.md</licenseUrl>
+ <projectUrl>https://github.com/benfoster/Fabrik.SimpleBus</projectUrl>
+ <copyright>Copyright 2013 Ben Foster</copyright>
+ <tags>fabrik dotnet messaging messagebus</tags>
+ </metadata>
+</package>
@@ -0,0 +1,5 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("Fabrik.SimpleBus")]
+[assembly: AssemblyDescription("Fabrik.SimpleBus is a simple in-process message bus written in C# that uses TPL Dataflow to provide asynchronous messaging capabilities.")]
View
@@ -1 +0,0 @@
-@.nuget\NuGet.exe pack

0 comments on commit f3e6f41

Please sign in to comment.