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

Update deps #52

Closed
wants to merge 5 commits into from
Closed
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ ipch/
# Visual Studio profiler
*.psess
*.vsp
.vs/

# ReSharper is a .NET coding add-in
_ReSharper*
Expand Down Expand Up @@ -128,4 +129,4 @@ src/_NCrunch_GitTools.Core/
####################
# JetBrains IDEs
####################
.idea
.idea
19 changes: 6 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
language: csharp
solution: src/GitTools.Core.sln
sudo: false
dotnet: 1.0.3
dist: trusty
dotnet: 2.2.101
dist: xenial
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
- dotnet restore "./src/GitTools.Core.sln"
- dotnet restore ./src/
script:
- 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
- dotnet restore "./src/GitTools.Core.Tests/GitTools.Core.Tests.csproj" /p:TargetFramework=netcoreapp2.0
- dotnet build ./src/GitTools.Core.Tests/GitTools.Core.Tests.csproj --configuration Debug --framework netcoreapp2.0 -v:Normal
- dotnet test ./src/GitTools.Core.Tests/GitTools.Core.Tests.csproj --no-build --framework netcoreapp2.0 --filter TestCategory!=NoMono -v:Normal
# - 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"
8 changes: 4 additions & 4 deletions src/GitTools.Core.Tests/Git/DynamicRepositoriesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void WorksCorrectlyWithRemoteRepository(string branchName, string expecte
{
using (var fixture = new EmptyRepositoryFixture())
{
var expectedDynamicRepoLocation = Path.Combine(tempPath, fixture.RepositoryPath.Split(Path.DirectorySeparatorChar).Last());
var expectedDynamicRepoLocation = Path.Combine(tempPath, fixture.RepositoryPath.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).Last());

fixture.Repository.MakeCommits(5);
fixture.Repository.CreateFileAndCommit("TestFile.txt");
Expand All @@ -50,7 +50,7 @@ public void WorksCorrectlyWithRemoteRepository(string branchName, string expecte
using (var dynamicRepository = DynamicRepositories.CreateOrOpen(repositoryInfo, tempPath, branchName, branch.Tip.Sha))
{
dynamicRepositoryPath = dynamicRepository.Repository.Info.Path;
dynamicRepository.Repository.Info.Path.ShouldBe(Path.Combine(expectedDynamicRepoLocation, ".git\\"));
dynamicRepository.Repository.Info.Path.ShouldBe(Path.Combine(expectedDynamicRepoLocation, ".git" + Path.DirectorySeparatorChar));

var currentBranch = dynamicRepository.Repository.Head.CanonicalName;

Expand Down Expand Up @@ -130,7 +130,7 @@ public void PicksAnotherDirectoryNameWhenDynamicRepoFolderTaken()
{
var head = fixture.Repository.CreateFileAndCommit("TestFile.txt");
File.Copy(Path.Combine(fixture.RepositoryPath, "TestFile.txt"), Path.Combine(tempDir, "TestFile.txt"));
expectedDynamicRepoLocation = Path.Combine(tempPath, fixture.RepositoryPath.Split(Path.DirectorySeparatorChar).Last());
expectedDynamicRepoLocation = Path.Combine(tempPath, fixture.RepositoryPath.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).Last());
Directory.CreateDirectory(expectedDynamicRepoLocation);

var repositoryInfo = new RepositoryInfo
Expand All @@ -140,7 +140,7 @@ public void PicksAnotherDirectoryNameWhenDynamicRepoFolderTaken()

using (var dynamicRepository = DynamicRepositories.CreateOrOpen(repositoryInfo, tempPath, "master", head.Sha))
{
dynamicRepository.Repository.Info.Path.ShouldBe(Path.Combine(expectedDynamicRepoLocation + "_1", ".git\\"));
dynamicRepository.Repository.Info.Path.ShouldBe(Path.Combine(expectedDynamicRepoLocation + "_1", ".git" + Path.DirectorySeparatorChar));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/GitTools.Core.Tests/Git/GitRepositoryHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public void GitHubFlowMajorRelease()
// fixture.AssertFullSemver("2.0.0");
fixture.MakeACommit();

#if !NETCOREAPP1_1
#if !NETCOREAPP2_0
fixture.Repository.DumpGraph();
#endif
// fixture.AssertFullSemver("2.0.1+1");
Expand Down
48 changes: 20 additions & 28 deletions src/GitTools.Core.Tests/GitTools.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,48 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">Any CPU</Platform>
<Platform Condition=" '$(Platform)' == '' ">Any CPU</Platform>
<OutputType>Library</OutputType>
<TargetFramework>net46</TargetFramework>
<TargetFrameworks>netcoreapp1.1;net46</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DebugType>full</DebugType>
<OutputPath>..\..\output\debug\GitTools.Core.Tests\$(TargetFramework)\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\output\release\GitTools.Core.Tests\$(TargetFramework)\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitTools.Testing" Version="1.2.0" />
<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 Condition=" '$(Configuration)' == 'netcoreapp1.1' ">
<PackageReference Include="Atlassian.SDK" Version="9.5.0" />
<ItemGroup>
<PackageReference Include="GitTools.Testing" Version="1.2.0-pullrequest0020-0034" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="Atlassian.SDK" Version="10.4.0" />
</ItemGroup>

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


<ItemGroup>
<ProjectReference Include="..\GitTools.Core\GitTools.Core.csproj" />
</ItemGroup>
<ProjectReference Include="..\GitTools.Core\GitTools.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</ItemGroup>

</Project>
11 changes: 0 additions & 11 deletions src/GitTools.Core.Tests/app.config

This file was deleted.

5 changes: 5 additions & 0 deletions src/GitTools.Core.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/TagAlwaysOnNewLine/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/WrapBeforeAttr/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/WrapLongLines/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlDocFormatter/WRAP_LINES/@EntryValue">False</s:Boolean>

<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/MaxSingleLineTagLength/@EntryValue">20</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/WrapBeforeAttr/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/WrapLongLines/@EntryValue">False</s:Boolean>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/MaxBlankLines/@EntryValue">1</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/ProcessingInstructionAttributesFormat/@EntryValue">OnSingleLine</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/TagAttributesFormat/@EntryValue">FirstAttributeOnSingleLine</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/XmlFormatter/WRAP_LINES/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CSharpFileLayoutPatterns/Pattern/@EntryValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&#xD;
&lt;Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"&gt;&#xD;
&lt;TypePattern Priority="100" DisplayName="Type Pattern"&gt;&#xD;
Expand Down Expand Up @@ -446,10 +448,13 @@ II.2.12 &lt;HandlesEvent /&gt;&#xD;
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpFileLayoutPatternsUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/UnitTesting/DisabledProviders/=NUnit2x/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/Environment/UserInterface/ShortcutSchemeName/@EntryValue">None</s:String>
<s:String x:Key="/Default/FilterSettingsManager/AttributeFilterXml/@EntryValue">&lt;data /&gt;</s:String>
Expand Down
2 changes: 1 addition & 1 deletion src/GitTools.Core/Git/DynamicRepositories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static string GetLockFile(string repoPath)

static string GetAndLockTemporaryRepositoryPath(string targetUrl, string dynamicRepositoryLocation)
{
var repositoryName = targetUrl.Split('/', '\\').Last().Replace(".git", string.Empty);
var repositoryName = targetUrl.Split(new[] { '/', '\\' }, StringSplitOptions.RemoveEmptyEntries).Last().Replace(".git", string.Empty);
var possiblePath = Path.Combine(dynamicRepositoryLocation, repositoryName);

var i = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/GitTools.Core/Git/Extensions/LibGitExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static void CheckoutFilesIfExist(this IRepository repository, params stri
}
}

#if !NETSTANDARD1_3
#if !NETSTANDARD2_0
public static void DumpGraph(this IRepository repository, Action<string> writer = null, int? maxCommits = null)
{
DumpGraph(repository.Info.Path, writer, maxCommits);
Expand Down
49 changes: 14 additions & 35 deletions src/GitTools.Core/GitTools.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--<TargetFramework>netstandard1.3</TargetFramework>-->
<!--<TargetFramework>netstandard2.0</TargetFramework>-->
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard1.3;net45;net40</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>

<!--Start of Nuspec metadata-->
<PackageId>GitTools.Core</PackageId>
Expand All @@ -17,43 +17,22 @@
<PackageIconUrl>https://raw.github.com/GitTools/GitTools.Core/master/GitTools_logo.png</PackageIconUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
<DefineConstants>TRACE;NET45;NETDESKTOP</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
<DefineConstants>TRACE;NET461;NETDESKTOP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
<DefineConstants>TRACE;NET40;NETDESKTOP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<DefineConstants>TRACE;LIBLOG_PORTABLE;NETSTANDARD1_3;</DefineConstants>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>TRACE;LIBLOG_PORTABLE;NETSTANDARD2_0;</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LibGit2Sharp" Version="0.25.0-preview-0033" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<PackageReference Include="JetBrains.Annotations" Version="10.4.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<PackageReference Include="JetBrains.Annotations" Version="10.4.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
<PackageReference Include="LibGit2Sharp" Version="0.26.0-preview-0070" />
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="JetBrains.Annotations" Version="10.4.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
</ItemGroup>
</Project>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
</ItemGroup>
</Project>
9 changes: 3 additions & 6 deletions src/GitTools.Core/GitTools.Core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@
</dependencies>
</metadata>
<files>
<file src="net4\GitTools.Core.dll" target="lib\net4\" />
<file src="net4\GitTools.Core.pdb" target="lib\net4\" />
<file src="net4\GitTools.Core.xml" target="lib\net4\" />
<file src="net45\GitTools.Core.dll" target="lib\net45\" />
<file src="net45\GitTools.Core.pdb" target="lib\net45\" />
<file src="net45\GitTools.Core.xml" target="lib\net45\" />
<file src="net461\GitTools.Core.dll" target="lib\net461\" />
<file src="net461\GitTools.Core.pdb" target="lib\net461\" />
<file src="net461\GitTools.Core.xml" target="lib\net461\" />
</files>
</package>
6 changes: 3 additions & 3 deletions src/GitTools.Core/Helpers/ProcessHelper.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#if !NETSTANDARD1_3
#if !NETSTANDARD2_0
namespace GitTools
{
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;


public static class ProcessHelper
{
Expand Down