Skip to content

Commit

Permalink
Merge pull request #261 from TestStack/dotnetcore2
Browse files Browse the repository at this point in the history
Upgrading to dotnetcore 2.0
  • Loading branch information
MehdiK committed Nov 13, 2017
2 parents 2d74ac0 + 3887fab commit 10ee0c9
Show file tree
Hide file tree
Showing 21 changed files with 223 additions and 287 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -11,6 +11,8 @@ obj/
*.crunchproject.local.xml
*.crunchsolution.local.xml
*.cache
*.userprefs
.DS_Store
packages/*
PackageBuild/*
Build/*
Expand All @@ -20,7 +22,9 @@ _NCrunch_TestStack.BDDfy/
TestStack.BDDfy.sln.ide/
src/packages/
src/.vs/
.vs/
project.lock.json
tools/Cake/
tools/GitReleaseNotes/
tools/gitversion.commandline/
artifacts/
5 changes: 5 additions & 0 deletions GitVersion.yml
@@ -0,0 +1,5 @@
mode: ContinuousDelivery
next-version: 4.1.0
branches: {}
ignore:
sha: []
1 change: 0 additions & 1 deletion GitVersionConfig.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -8,7 +8,7 @@ configuration:
- Release

build_script:
- ps: .\build.ps1
- powershell .\build.ps1

test: off
skip_tags: true
Expand Down
12 changes: 5 additions & 7 deletions build.cake
@@ -1,7 +1,8 @@
#tool "nuget:?package=GitReleaseNotes"
#tool "nuget:?package=GitVersion.CommandLine"

var target = Argument("target", "Default");
var bddfyProj = "./src/TestStack.BDDfy/project.json";
var bddfyProj = "./src/TestStack.BDDfy/TestStack.BDDfy.csproj";
var outputDir = "./artifacts/";

Task("Clean")
Expand All @@ -24,12 +25,7 @@ Task("Version")
UpdateAssemblyInfo = true,
OutputType = GitVersionOutput.BuildServer
});
versionInfo = GitVersion(new GitVersionSettings{ OutputType = GitVersionOutput.Json });
// Update project.json
var updatedProjectJson = System.IO.File.ReadAllText(bddfyProj)
.Replace("1.0.0-*", versionInfo.NuGetVersion);
System.IO.File.WriteAllText(bddfyProj, updatedProjectJson);
versionInfo = GitVersion(new GitVersionSettings{ OutputType = GitVersionOutput.Json });
});

Task("Build")
Expand All @@ -52,6 +48,7 @@ Task("Package")
.Does(() => {
var settings = new DotNetCorePackSettings
{
ArgumentCustomization = args=> args.Append(" --include-symbols /p:PackageVersion=" + versionInfo.NuGetVersion),
OutputDirectory = outputDir,
NoBuild = true
};
Expand All @@ -61,6 +58,7 @@ Task("Package")
var releaseNotesExitCode = StartProcess(
@"tools\GitReleaseNotes\tools\gitreleasenotes.exe",
new ProcessSettings { Arguments = ". /o artifacts/releasenotes.md" });
if (string.IsNullOrEmpty(System.IO.File.ReadAllText("./artifacts/releasenotes.md")))
System.IO.File.WriteAllText("./artifacts/releasenotes.md", "No issues closed since last release");
Expand Down
19 changes: 0 additions & 19 deletions src/Samples/TestStack.BDDfy.Samples/Properties/AssemblyInfo.cs

This file was deleted.

39 changes: 39 additions & 0 deletions src/Samples/TestStack.BDDfy.Samples/TestStack.BDDfy.Samples.csproj
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<AssemblyName>TestStack.BDDfy.Samples</AssemblyName>
<PackageId>TestStack.BDDfy.Samples</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../../TestStack.BDDfy/TestStack.BDDfy.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.0.0" />
<PackageReference Include="shouldly" Version="3.0.0-beta0003" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="System.Linq" Version="4.3.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
<DefineConstants>$(DefineConstants);Approvals;Culture;NSubstitute</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
22 changes: 0 additions & 22 deletions src/Samples/TestStack.BDDfy.Samples/TestStack.BDDfy.Samples.xproj

This file was deleted.

43 changes: 0 additions & 43 deletions src/Samples/TestStack.BDDfy.Samples/project.json

This file was deleted.

22 changes: 0 additions & 22 deletions src/TestStack.BDDfy.Tests/Properties/AssemblyInfo.cs

This file was deleted.

44 changes: 44 additions & 0 deletions src/TestStack.BDDfy.Tests/TestStack.BDDfy.Tests.csproj
@@ -0,0 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<AssemblyName>TestStack.BDDfy.Tests</AssemblyName>
<PackageId>TestStack.BDDfy.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../TestStack.BDDfy/TestStack.BDDfy.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.0.0" />
<PackageReference Include="nsubstitute" Version="3.1.0" />
<PackageReference Include="shouldly" Version="3.0.0-beta0003" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="System.Linq" Version="4.3.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net46' ">
<DefineConstants>$(DefineConstants);Approvals;Culture</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
22 changes: 0 additions & 22 deletions src/TestStack.BDDfy.Tests/TestStack.BDDfy.Tests.xproj

This file was deleted.

43 changes: 0 additions & 43 deletions src/TestStack.BDDfy.Tests/project.json

This file was deleted.

0 comments on commit 10ee0c9

Please sign in to comment.