Skip to content

Commit

Permalink
Update CI again
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenRedd committed Jun 18, 2019
1 parent 1fe764d commit 7caef96
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 52 deletions.
11 changes: 2 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,17 @@ build:
publish_nuget: true
publish_nuget_symbols: true
use_snupkg_format: true
test: off
test: on
artifacts:
- path: '**\*.nupkg'
name: NuGet Packages
- path: '**\*.snupkg'
name: NuGet Symbols Packages
deploy:
- provider: NuGet
server: https://www.myget.org/F/nulldesk-ci/api/v2/package
api_key:
secure: uBiyeuaz9rRv16bZe/X6HID91rZK//umRAHXo0gRh8l57p8MElDVETuqSwFXZVme
symbol_server: https://www.myget.org/F/nulldesk-ci/symbols/api/v2/package
on:
branch: master
- provider: NuGet
name: production
api_key:
secure: QAxZSIPDkPX/ziDi/D7MZ4nF3bimBfEQ35RiKwO0Lug7HE3lvqGC/zAs1HrWfrDY
secure: g51pGgMjLDtttxJLWt+Fbz2XserKjK4wdalDS7OnhzTmiV+a5yC+IXD0U/1LGZuN
on:
branch: master
appveyor_repo_tag: true
Expand Down
44 changes: 6 additions & 38 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@


<#
.SYNOPSIS
You can add this to you build script to ensure that psbuild is available before calling
Invoke-MSBuild. If psbuild is not available locally it will be downloaded automatically.
#>

function EnsurePsbuildInstalled{
[cmdletbinding()]
param(
Expand All @@ -26,17 +22,9 @@ function EnsurePsbuildInstalled{
}
}

# Taken from psake https://github.com/psake/psake

<#
.SYNOPSIS
This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode
to see if an error occcured. If an error is detected then an exception is thrown.
This function allows you to run command-line programs without having to
explicitly check the $lastexitcode variable.
.EXAMPLE
exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"
#>



function Exec {
[CmdletBinding()]
param(
Expand Down Expand Up @@ -86,30 +74,10 @@ if(!$config){
# loop through projects and collect src and test project paths
foreach ($folder in $srcDir) {
$p = Join-Path -Path $folder.FullName -ChildPath '*.csproj';
# only src project folders -> folders with a csproj file
if (Test-Path $p -PathType Leaf) {
$projectFolders += $folder.FullName
# find the test project, if one exists, and run each
$testFolderPath = ".\test\" + $folder.Name + ".Tests"
if (Test-Path $testFolderPath -PathType Container){
$x = Join-Path -Path $testFolderPath -ChildPath 'xunit.runner.json';
if (Test-Path $x -PathType Leaf) {
$testFolders += $testFolderPath
}
}
}
}

# run tests first
foreach($testFolder in $testFolders){
Write-Output ""
Write-Output "--------"
Write-Output "testing : $testFolder"
Write-Output "--------"
Set-Location $testFolder
exec { & dotnet test --configuration $config --filter "TestType=Unit" }
Set-Location $rootDir
}
exec { & dotnet test --configuration $config --filter "TestType=Unit" }


# package src projects
foreach($srcFolder in $projectFolders){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>NullDesk Mailer Extensions base classes and abstractions for email messaging services</Description>
<VersionPrefix>5.1.3</VersionPrefix>
<VersionPrefix>5.1.4</VersionPrefix>
<Authors>Stephen M. Redd</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -20,6 +20,7 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Copyright>Stephen M. Redd 2017</Copyright>
<IsPackable>true</IsPackable>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<None Include="MessageModel\ContentBody.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>NullDesk Mailer Extension for SQL Server email messsage and delivery history storage using EntityFramework Core</Description>
<VersionPrefix>5.1.3</VersionPrefix>
<VersionPrefix>5.1.4</VersionPrefix>
<Authors>Stephen M. Redd</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -20,6 +20,7 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Copyright>Stephen M. Redd 2017</Copyright>
<IsPackable>true</IsPackable>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>NullDesk Mailer Extensions base implementation of messsage and delivery history storage with EntityFramework Core.</Description>
<VersionPrefix>5.1.3</VersionPrefix>
<VersionPrefix>5.1.4</VersionPrefix>
<Authors>Stephen M. Redd</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -20,6 +20,7 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Copyright>Stephen M. Redd 2017</Copyright>
<IsPackable>true</IsPackable>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\NullDesk.Extensions.Mailer.Core\NullDesk.Extensions.Mailer.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>NullDesk Mailer Extensions for SMTP Email messaging using MailKit</Description>
<VersionPrefix>5.1.3</VersionPrefix>
<VersionPrefix>5.1.4</VersionPrefix>
<Authors>Stephen M. Redd</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -20,6 +20,7 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Copyright>Stephen M. Redd 2017</Copyright>
<IsPackable>true</IsPackable>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MailKit" Version="2.1.0.3" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>NullDesk Mailer Extensions for Email messaging using SendGrid API services</Description>
<VersionPrefix>5.1.3</VersionPrefix>
<VersionPrefix>5.1.4</VersionPrefix>
<Authors>Stephen M. Redd</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -20,6 +20,7 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Copyright>Stephen M. Redd 2017</Copyright>
<IsPackable>true</IsPackable>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\NullDesk.Extensions.Mailer.Core\NullDesk.Extensions.Mailer.Core.csproj" />
Expand Down

0 comments on commit 7caef96

Please sign in to comment.