-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from Research-Institute/develop
Upgrade tooling to .Net Core SDK v1.0.1
- Loading branch information
Showing
13 changed files
with
105 additions
and
245 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +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( | ||
[string]$psbuildInstallUri = 'https://raw.githubusercontent.com/ligershark/psbuild/master/src/GetPSBuild.ps1' | ||
) | ||
process{ | ||
if(-not (Get-Command "Invoke-MsBuild" -errorAction SilentlyContinue)){ | ||
'Installing psbuild from [{0}]' -f $psbuildInstallUri | Write-Verbose | ||
(new-object Net.WebClient).DownloadString($psbuildInstallUri) | iex | ||
} | ||
else{ | ||
'psbuild already loaded, skipping download' | Write-Verbose | ||
} | ||
|
||
# make sure it's loaded and throw if not | ||
if(-not (Get-Command "Invoke-MsBuild" -errorAction SilentlyContinue)){ | ||
throw ('Unable to install/load psbuild from [{0}]' -f $psbuildInstallUri) | ||
} | ||
} | ||
} | ||
|
||
# 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( | ||
[Parameter(Position=0,Mandatory=1)][scriptblock]$cmd, | ||
[Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd) | ||
) | ||
& $cmd | ||
if ($lastexitcode -ne 0) { | ||
throw ("Exec: " + $errorMessage) | ||
} | ||
} | ||
|
||
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } | ||
|
||
EnsurePsbuildInstalled | ||
|
||
exec { & dotnet restore } | ||
|
||
#Invoke-MSBuild | ||
|
||
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; | ||
$revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) | ||
|
||
exec { & dotnet build .\src\JsonApiDotNetCore -c Release } | ||
|
||
exec { & dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision } | ||
dotnet restore .\src\JsonApiDotNetCore\JsonApiDotNetCore.csproj | ||
dotnet build .\src\JsonApiDotNetCore -c Release | ||
dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$revision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<VersionPrefix>1.1.0</VersionPrefix> | ||
<TargetFramework>netcoreapp1.0</TargetFramework> | ||
<AssemblyName>JsonApiDotNetCore</AssemblyName> | ||
<PackageId>JsonApiDotNetCore</PackageId> | ||
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion> | ||
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp1.0</TargetFramework> | ||
<PreserveCompilationContext>true</PreserveCompilationContext> | ||
<AssemblyName>JsonApiDotNetCoreExample</AssemblyName> | ||
<OutputType>Exe</OutputType> | ||
<PackageId>JsonApiDotNetCoreExample</PackageId> | ||
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion> | ||
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../JsonApiDotNetCore/JsonApiDotNetCore.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.0.0" /> | ||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="1.1.0" /> | ||
<PackageReference Include="DotNetCoreDocs" Version="0.4.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
test/JsonApiDotNetCoreExampleTests/JsonApiDotNetCoreExampleTests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp1.0</TargetFramework> | ||
<PreserveCompilationContext>true</PreserveCompilationContext> | ||
<AssemblyName>JsonApiDotNetCoreExampleTests</AssemblyName> | ||
<OutputType>Exe</OutputType> | ||
<PackageId>JsonApiDotNetCoreExampleTests</PackageId> | ||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
<ServerGarbageCollection>true</ServerGarbageCollection> | ||
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion> | ||
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Update="xunit.runner.json;appsettings.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../../src/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta5-build1225" /> | ||
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" /> | ||
<PackageReference Include="Bogus" Version="8.0.1-beta-1" /> | ||
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" /> | ||
<PackageReference Include="Moq" Version="4.7.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.