Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Added NetStandard and Upgraded solution. #42

Merged
merged 8 commits into from
Jul 29, 2017
Merged
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
19 changes: 15 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
language: csharp
solution: src/GitTools.Core.sln
sudo: false
dotnet: 1.0.3
dist: trusty
mono: none
addons:
apt:
sources:
- sourceline: 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main'
key_url: 'https://apt-mo.trafficmanager.net/keys/microsoft.asc'
packages:
- dotnet-dev-1.0.3
install:
# - sudo nuget update -self
- nuget restore src/GitTools.Core.sln
- nuget install NUnit.Runners -Version 3.2.1 -OutputDirectory ./src/packages
- dotnet restore "./src/GitTools.Core.sln"
script:
- xbuild ./src/GitTools.Core.sln /property:Configuration="Debug" /verbosity:detailed
- mono --debug --runtime=v4.0.30319 ./src/packages/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe ./output/debug/GitTools.Core.Tests/net45/GitTools.Core.Tests.dll -where "cat != NoMono"
- dotnet restore "./src/GitTools.Core.Tests/GitTools.Core.Tests.csproj" /p:TargetFramework=netcoreapp1.1 /verbosity:detailed
- dotnet build "./src/GitTools.Core.Tests/GitTools.Core.Tests.csproj" --configuration Debug --framework netcoreapp1.1 /verbosity:detailed
- dotnet test "./src/GitTools.Core.Tests/GitTools.Core.Tests.csproj" --framework netcoreapp1.1 --filter TestCategory!=NoMono
# - mono --debug --runtime=v4.0.30319 %userprofile%.nuget/packages/nunit.consolerunner/3.6.1/tools/nunit3-console.exe ./output/debug/GitTools.Core.Tests/net45/GitTools.Core.Tests.dll -where "cat != NoMono"
23 changes: 12 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
environment:
path_to_sln: src/GitTools.Core.sln

install:
- choco install gitversion.portable -pre -y
- cinst gitlink -y

platform:
- Any CPU

configuration:
- Release
platform: Any CPU
configuration: Release
image: Visual Studio 2017

assembly_info:
patch: false

before_build:
- nuget restore src\
- ps: gitversion /l console /output buildserver /updateAssemblyInfo src\SolutionAssemblyInfo.cs
- cmd: msbuild %path_to_sln% /t:restore /p:PackageVersion=%GitVersion_NuGetVersion% /p:Configuration=Release /p:Platform="Any CPU"

build:
project: src\GitTools.Core.sln
build_script:
- cmd: msbuild %path_to_sln% /t:Build /p:Configuration=Release /p:Platform="Any CPU"

after_build:
- cmd: gitlink . -u https://github.com/gittools/gittools.core -b %APPVEYOR_REPO_BRANCH% -s %APPVEYOR_REPO_COMMIT% -f src\GitTools.Core.sln
- cmd: nuget pack src\GitTools.Core\GitTools.Core.nuspec -BasePath output\%CONFIGURATION%\GitTools.Core\ -version "%GitVersion_NuGetVersion%"
- cmd: gitlink . -u https://github.com/gittools/gittools.core -b %APPVEYOR_REPO_BRANCH% -s %APPVEYOR_REPO_COMMIT% -f %path_to_sln%
- cmd: msbuild %path_to_sln% /t:Pack /p:PackageVersion=%GitVersion_NuGetVersion% /p:PackageOutputPath="%APPVEYOR_BUILD_FOLDER%"
- cmd: appveyor PushArtifact "GitTools.Core.%GitVersion_NuGetVersion%.nupkg"

cache:
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
3 changes: 3 additions & 0 deletions src/GitTools.Core.Tests/Git/GitRepositoryHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ public void GitHubFlowMajorRelease()
fixture.ApplyTag("2.0.0");
// fixture.AssertFullSemver("2.0.0");
fixture.MakeACommit();

#if !NETCOREAPP1_1
fixture.Repository.DumpGraph();
#endif
// fixture.AssertFullSemver("2.0.1+1");
}
}
Expand Down
121 changes: 38 additions & 83 deletions src/GitTools.Core.Tests/GitTools.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,103 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.160\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.160\build\LibGit2Sharp.NativeBinaries.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}</ProjectGuid>
<Platform Condition=" '$(Platform)' == '' ">Any CPU</Platform>

<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GitTools.Tests</RootNamespace>
<AssemblyName>GitTools.Core.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<LangVersion>5</LangVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFramework>net46</TargetFramework>
<TargetFrameworks>netcoreapp1.1;net46</TargetFrameworks>
<!--<TargetFramework>netcoreapp1.1;net46</TargetFramework>-->
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\output\debug\GitTools.Core.Tests\net45\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591,1701</NoWarn>
<DebugType>full</DebugType>
<OutputPath>..\..\output\debug\GitTools.Core.Tests\$(TargetFramework)\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\output\release\GitTools.Core.Tests\net45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591</NoWarn>
<OutputPath>..\..\output\release\GitTools.Core.Tests\$(TargetFramework)\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="Atlassian.Jira, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Atlassian.SDK.2.5.0\lib\Atlassian.Jira.dll</HintPath>
</Reference>
<Reference Include="GitTools.Testing, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\GitTools.Testing.1.1.1-beta0001\lib\net4\GitTools.Testing.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LibGit2Sharp, Version=0.23.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
<HintPath>..\packages\LibGit2Sharp.0.23.0-pre20160922233542\lib\net40\LibGit2Sharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Shouldly, Version=2.8.2.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\packages\Shouldly.2.8.2\lib\net40\Shouldly.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />

<ItemGroup>
<PackageReference Include="Dazinator.GitTools.Testing.Netstandard" Version="1.1.1-beta0001temp" />
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.7.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.*" />
<PackageReference Include="Shouldly" Version="2.8.3" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SolutionAssemblyInfo.cs">
<Link>Properties\SolutionAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Git\Extensions\AuthenticationInfoExtensionsTests.cs" />
<Compile Include="Git\GitDirFinderTests.cs" />
<Compile Include="Git\GitRepositoryHelperTests.cs" />
<Compile Include="Git\DynamicRepositoriesTests.cs" />
<Compile Include="GlobalInitialization.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />

<ItemGroup Condition=" '$(Configuration)' == 'netcoreapp1.1' ">
<PackageReference Include="Atlassian.SDK" Version="9.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitTools.Core\GitTools.Core.NET40\GitTools.Core.NET40.csproj">
<Project>{C11252F9-0ECA-44DC-860B-E029C04FBD10}</Project>
<Name>GitTools.Core.NET40</Name>
</ProjectReference>

<ItemGroup Condition=" '$(Configuration)' == 'net46' ">
<PackageReference Include="Atlassian.SDK" Version="2.5.0" />
</ItemGroup>



<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ProjectReference Include="..\GitTools.Core\GitTools.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.160\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.160\build\LibGit2Sharp.NativeBinaries.props'))" />
</Target>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<!-- 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.
<Target Name="BeforeBuild">
Expand Down
4 changes: 0 additions & 4 deletions src/GitTools.Core.Tests/Properties/AssemblyInfo.cs

This file was deleted.

4 changes: 2 additions & 2 deletions src/GitTools.Core.Tests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="LibGit2Sharp" publicKeyToken="7cbde695407f0333" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.23.0.0" newVersion="0.23.0.0" />
<bindingRedirect oldVersion="0.0.0.0-0.24.0.0" newVersion="0.24.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration>
10 changes: 0 additions & 10 deletions src/GitTools.Core.Tests/packages.config

This file was deleted.

51 changes: 14 additions & 37 deletions src/GitTools.Core.sln
Original file line number Diff line number Diff line change
@@ -1,64 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.26430.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".misc", ".misc", "{72ECAB81-A674-4AC8-8795-7AD71C3E1A5A}"
ProjectSection(SolutionItems) = preProject
..\.gitattributes = ..\.gitattributes
..\.gitignore = ..\.gitignore
..\.travis.yml = ..\.travis.yml
..\appveyor.yml = ..\appveyor.yml
GitTools.Core.sln.DotSettings = GitTools.Core.sln.DotSettings
..\GitVersionConfig.yaml = ..\GitVersionConfig.yaml
..\README.md = ..\README.md
Settings.StyleCop = Settings.StyleCop
SolutionAssemblyInfo.cs = SolutionAssemblyInfo.cs
..\.gitattributes = ..\.gitattributes
..\.gitignore = ..\.gitignore
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitTools.Core.Tests", "GitTools.Core.Tests\GitTools.Core.Tests.csproj", "{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitTools.Core", "GitTools.Core\GitTools.Core.csproj", "{DD19E93F-C6CC-4748-9EF8-146101AA7F59}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitTools.Core.NET40", "GitTools.Core\GitTools.Core.NET40\GitTools.Core.NET40.csproj", "{C11252F9-0ECA-44DC-860B-E029C04FBD10}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitTools.Core", "GitTools.Core", "{753DD689-12ED-42D8-8AF7-936336D65FA0}"
ProjectSection(SolutionItems) = preProject
GitTools.Core\GitTools.Core.nuspec = GitTools.Core\GitTools.Core.nuspec
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitTools.Core.NET45", "GitTools.Core\GitTools.Core.NET45\GitTools.Core.NET45.csproj", "{66295D7C-58FD-4641-AEAB-3DF7EA8FA4D2}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GitTools.Core.Shared", "GitTools.Core\GitTools.Core.Shared\GitTools.Core.Shared.shproj", "{C4B449DF-3E78-4F3B-81A8-DE0DC5827532}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitTools.Core.Tests", "GitTools.Core.Tests\GitTools.Core.Tests.csproj", "{47DE8A01-26B5-4907-9D32-9DA5F80F3B55}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
GitTools.Core\GitTools.Core.Shared\GitTools.Core.Shared.projitems*{66295d7c-58fd-4641-aeab-3df7ea8fa4d2}*SharedItemsImports = 4
GitTools.Core\GitTools.Core.Shared\GitTools.Core.Shared.projitems*{c4b449df-3e78-4f3b-81a8-de0dc5827532}*SharedItemsImports = 13
GitTools.Core\GitTools.Core.Shared\GitTools.Core.Shared.projitems*{c11252f9-0eca-44dc-860b-e029c04fbd10}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}.Release|Any CPU.Build.0 = Release|Any CPU
{C11252F9-0ECA-44DC-860B-E029C04FBD10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C11252F9-0ECA-44DC-860B-E029C04FBD10}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C11252F9-0ECA-44DC-860B-E029C04FBD10}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C11252F9-0ECA-44DC-860B-E029C04FBD10}.Release|Any CPU.Build.0 = Release|Any CPU
{66295D7C-58FD-4641-AEAB-3DF7EA8FA4D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66295D7C-58FD-4641-AEAB-3DF7EA8FA4D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66295D7C-58FD-4641-AEAB-3DF7EA8FA4D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66295D7C-58FD-4641-AEAB-3DF7EA8FA4D2}.Release|Any CPU.Build.0 = Release|Any CPU
{DD19E93F-C6CC-4748-9EF8-146101AA7F59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD19E93F-C6CC-4748-9EF8-146101AA7F59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD19E93F-C6CC-4748-9EF8-146101AA7F59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD19E93F-C6CC-4748-9EF8-146101AA7F59}.Release|Any CPU.Build.0 = Release|Any CPU
{47DE8A01-26B5-4907-9D32-9DA5F80F3B55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47DE8A01-26B5-4907-9D32-9DA5F80F3B55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47DE8A01-26B5-4907-9D32-9DA5F80F3B55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47DE8A01-26B5-4907-9D32-9DA5F80F3B55}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C11252F9-0ECA-44DC-860B-E029C04FBD10} = {753DD689-12ED-42D8-8AF7-936336D65FA0}
{66295D7C-58FD-4641-AEAB-3DF7EA8FA4D2} = {753DD689-12ED-42D8-8AF7-936336D65FA0}
{C4B449DF-3E78-4F3B-81A8-DE0DC5827532} = {753DD689-12ED-42D8-8AF7-936336D65FA0}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// </summary>
public abstract class Disposable : IDisposable
{
static readonly ILog Log = LogProvider.GetCurrentClassLogger();
static readonly ILog Log = LogProvider.GetLogger(typeof(Disposable));

readonly object _syncRoot = new object();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace GitTools
{
using System;
using System.Runtime.Serialization;

[Serializable]
public class GitToolsException : Exception
{
public GitToolsException(string messageFormat, params object[] args)
Expand All @@ -12,5 +14,12 @@ public GitToolsException(string message, Exception innerException)
: base(message, innerException)
{
}

#if NETDESKTOP
protected GitToolsException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ public WarningException(string message)
{
}

#if NETDESKTOP
protected WarningException(SerializationInfo info, StreamingContext context)
: base(info, context)
: base(info, context)
{
}
#endif
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public static class DynamicRepositories
{
static readonly ILog Log = LogProvider.GetCurrentClassLogger();
static readonly ILog Log = LogProvider.GetLogger(typeof(DynamicRepositories));

/// <summary>
/// Creates a dynamic repository based on the repository info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public static class AuthenticationInfoExtensions
{
private static readonly ILog Log = LogProvider.GetCurrentClassLogger();
static readonly ILog Log = LogProvider.GetLogger(typeof(AuthenticationInfoExtensions));

public static FetchOptions ToFetchOptions(this AuthenticationInfo authenticationInfo)
{
Expand Down
Loading