Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
language: csharp
solution: src/SparkPost.sln
before_install:
- sudo apt-get install nunit-console
before_script:
- nuget restore src/SparkPost.sln
script:
- xbuild /p:Configuration=Release src/SparkPost.sln
- nunit-console /home/travis/build/darrencauthon/csharp-sparkpost/src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll

matrix:
include:
- mono: none
dotnet: 1.0.0-preview2-1-003177
env: DOTNETCORE=1
dist: trusty
solution: src/SparkPost.Dotnet.sln
sudo: required
script:
- dotnet restore src/SparkPost.NetStandard
- dotnet build src/SparkPost.NetStandard

- mono: latest
solution: src/SparkPost.sln
before_install:
- sudo apt-get install nunit-console
before_script:
- nuget restore src/SparkPost.sln
script:
- xbuild /p:Configuration=ReleaseNet45 src/SparkPost.sln
- nunit-console src/SparkPost.Tests/bin/ReleaseNet45/SparkPost.Tests.dll
34 changes: 17 additions & 17 deletions docker/readme.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
## Build & Deploy via Docker & Nuget
This docker container will pull the latest version of this library, create a nuget package, and deploy it to Nuget.
The only thing is needs is a valid Nuget API key, from someone that has rights to publish the package to Nuget.
```
cd docker
docker build . # this will produce a hash key, say 12345678
docker run -e "APIKEY=your_nuget_key_here" 12345678
```
This container has been registered on Docker Hub, and can be run like so:
```
docker run -e "APIKEY=your_nuget_key_here" darrencauthon/csharp-sparkpost
```
## Build & Deploy via Docker & Nuget

This docker container will pull the latest version of this library, create a nuget package, and deploy it to Nuget.

The only thing is needs is a valid Nuget API key, from someone that has rights to publish the package to Nuget.

```
cd docker
docker build . # this will produce a hash key, say 12345678
docker run -e "APIKEY=your_nuget_key_here" 12345678
```

This container has been registered on Docker Hub, and can be run like so:

```
docker run -e "APIKEY=your_nuget_key_here" darrencauthon/csharp-sparkpost
```
12 changes: 12 additions & 0 deletions src/SparkPost.Acceptance/SparkPost.Acceptance.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseNet45|AnyCPU'">
<OutputPath>bin\ReleaseNet45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
Expand Down Expand Up @@ -121,6 +130,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
21 changes: 21 additions & 0 deletions src/SparkPost.NetStandard/SparkPost.NetStandard.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>

<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>9b252ba6-3d9f-4303-8003-9a3a73a70d63</ProjectGuid>
<RootNamespace>SparkPost.NetStandard</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup>

<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
39 changes: 39 additions & 0 deletions src/SparkPost.NetStandard/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": "1.12.0-*",
"buildOptions": {
"compile": {
"include": [ "../SparkPost/**/*.cs" ]
},
"warningsAsErrors": false,
"outputName": "SparkPost"
},
"configurations": {
"Debug": {
"buildOptions": {
"define": [ "DEBUG", "TRACE" ]
}
},
"Release": {
"buildOptions": {
"define": [ "TRACE" ],
"optimize": true
}
},
"ReleaseNet45": {
"buildOptions": {
"define": [ "TRACE" ],
"optimize": true
}
}
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore5.0"
}
},
"dependencies": {
"NETStandard.Library": "1.6.0",
"Newtonsoft.Json": "9.0.1",
"System.Reflection.TypeExtensions": "4.3.0"
}
}
224 changes: 112 additions & 112 deletions src/SparkPost.Portable/SparkPost.Portable.csproj
Original file line number Diff line number Diff line change
@@ -1,113 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2F7E9E0B-27BB-42AC-AB4A-B8249B64C654}</ProjectGuid>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>SparkPost</RootNamespace>
<AssemblyName>SparkPost.Portable</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\SparkPost\Address.cs">
<Link>Address.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Attachment.cs">
<Link>Attachment.cs</Link>
</Compile>
<Compile Include="..\SparkPost\CcHandling.cs">
<Link>CcHandling.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Client.cs">
<Link>Client.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Content.cs">
<Link>Content.cs</Link>
</Compile>
<Compile Include="..\SparkPost\DataMapper.cs">
<Link>DataMapper.cs</Link>
</Compile>
<Compile Include="..\SparkPost\File.cs">
<Link>File.cs</Link>
</Compile>
<Compile Include="..\SparkPost\IClient.cs">
<Link>IClient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\InlineImage.cs">
<Link>InlineImage.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ITransmissions.cs">
<Link>ITransmissions.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Options.cs">
<Link>Options.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Recipient.cs">
<Link>Recipient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RecipientType.cs">
<Link>RecipientType.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Request.cs">
<Link>Request.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RequestSender.cs">
<Link>RequestSender.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Response.cs">
<Link>Response.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ResponseException.cs">
<Link>ResponseException.cs</Link>
</Compile>
<Compile Include="..\SparkPost\SendTransmissionResponse.cs">
<Link>SendTransmissionResponse.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmission.cs">
<Link>Transmission.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmissions.cs">
<Link>Transmissions.cs</Link>
</Compile>
<Compile Include="PortableReflectionExtensions.cs" />
<Compile Include="..\SparkPost\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="..\SparkPost\SparkPost.nuspec">
<Link>SparkPost.nuspec</Link>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2F7E9E0B-27BB-42AC-AB4A-B8249B64C654}</ProjectGuid>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>SparkPost</RootNamespace>
<AssemblyName>SparkPost.Portable</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>PORTABLE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<NoStdLib>false</NoStdLib>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\SparkPost\Address.cs">
<Link>Address.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Attachment.cs">
<Link>Attachment.cs</Link>
</Compile>
<Compile Include="..\SparkPost\CcHandling.cs">
<Link>CcHandling.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Client.cs">
<Link>Client.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Content.cs">
<Link>Content.cs</Link>
</Compile>
<Compile Include="..\SparkPost\DataMapper.cs">
<Link>DataMapper.cs</Link>
</Compile>
<Compile Include="..\SparkPost\File.cs">
<Link>File.cs</Link>
</Compile>
<Compile Include="..\SparkPost\IClient.cs">
<Link>IClient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\InlineImage.cs">
<Link>InlineImage.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ITransmissions.cs">
<Link>ITransmissions.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Options.cs">
<Link>Options.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Recipient.cs">
<Link>Recipient.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RecipientType.cs">
<Link>RecipientType.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Request.cs">
<Link>Request.cs</Link>
</Compile>
<Compile Include="..\SparkPost\RequestSender.cs">
<Link>RequestSender.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Response.cs">
<Link>Response.cs</Link>
</Compile>
<Compile Include="..\SparkPost\ResponseException.cs">
<Link>ResponseException.cs</Link>
</Compile>
<Compile Include="..\SparkPost\SendTransmissionResponse.cs">
<Link>SendTransmissionResponse.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmission.cs">
<Link>Transmission.cs</Link>
</Compile>
<Compile Include="..\SparkPost\Transmissions.cs">
<Link>Transmissions.cs</Link>
</Compile>
<Compile Include="PortableReflectionExtensions.cs" />
<Compile Include="..\SparkPost\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="..\SparkPost\SparkPost.nuspec">
<Link>SparkPost.nuspec</Link>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
</Project>
9 changes: 9 additions & 0 deletions src/SparkPost.Tests/SparkPost.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseNet45|AnyCPU'">
<OutputPath>bin\ReleaseNet45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMoq, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMoq.1.7.1.0\lib\net40\AutoMoq.dll</HintPath>
Expand Down
Loading