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

Commit 82e648d

Browse files
Merge pull request #38 from asbjornu/feature/process-helper
Improve process helper
2 parents 81cc9b2 + 87ea2ed commit 82e648d

15 files changed

+796
-695
lines changed

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ deployment/InnoSetup/template/snippets
8080
deployment/InnoSetup/template/libraries
8181
deployment/InnoSetup/template/doc
8282

83-
# Installshield output folder
83+
# Installshield output folder
8484
[Ee]xpress
8585

8686
# DocProject is a documentation generator add-in
@@ -115,11 +115,17 @@ Backup*/
115115
UpgradeLog*.XML
116116

117117
# Windows image file caches
118-
Thumbs.db
118+
Thumbs.db
119119

120120
# Folder config file
121121
Desktop.ini
122122

123123
# mstest test results
124124
TestResults
125125
src/_NCrunch_GitTools.Core/
126+
127+
128+
####################
129+
# JetBrains IDEs
130+
####################
131+
.idea

.travis.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
language: csharp
2-
solution: src/GitTools.Core.sln
3-
sudo: false
4-
install:
5-
# - sudo nuget update -self
6-
- nuget restore src/GitTools.Core.sln
7-
- nuget install NUnit.Runners -Version 3.2.1 -OutputDirectory ./src/packages
8-
script:
9-
- xbuild ./src/GitTools.Core.sln /property:Configuration="Debug" /verbosity:detailed
10-
- 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"
1+
language: csharp
2+
solution: src/GitTools.Core.sln
3+
sudo: false
4+
install:
5+
# - sudo nuget update -self
6+
- nuget restore src/GitTools.Core.sln
7+
- nuget install NUnit.Runners -Version 3.2.1 -OutputDirectory ./src/packages
8+
script:
9+
- xbuild ./src/GitTools.Core.sln /property:Configuration="Debug" /verbosity:detailed
10+
- 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"

src/GitTools.Core.Tests/Git/GitRepositoryHelperTests.cs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,52 @@ public void CheckedOutShaShouldNotChanged()
176176
}
177177
}
178178
}
179+
180+
181+
[Test]
182+
// Copied from GitVersion, to attempt fixing this bug: https://travis-ci.org/GitTools/GitVersion/jobs/171288284#L2025
183+
public void GitHubFlowMajorRelease()
184+
{
185+
using (var fixture = new EmptyRepositoryFixture())
186+
{
187+
fixture.SequenceDiagram.Participant("master");
188+
189+
fixture.Repository.MakeACommit();
190+
fixture.ApplyTag("1.3.0");
191+
192+
// Create release branch
193+
fixture.BranchTo("release/2.0.0", "release");
194+
fixture.SequenceDiagram.Activate("release/2.0.0");
195+
fixture.MakeACommit();
196+
// fixture.AssertFullSemver("2.0.0-beta.1+1");
197+
fixture.MakeACommit();
198+
// fixture.AssertFullSemver("2.0.0-beta.1+2");
199+
200+
// Apply beta.1 tag should be exact tag
201+
fixture.ApplyTag("2.0.0-beta.1");
202+
// fixture.AssertFullSemver("2.0.0-beta.1");
203+
204+
// test that the CommitsSinceVersionSource should still return commit count
205+
// var version = fixture.GetVersion();
206+
// version.CommitsSinceVersionSource.ShouldBe("2");
207+
208+
// Make a commit after a tag should bump up the beta
209+
fixture.MakeACommit();
210+
// fixture.AssertFullSemver("2.0.0-beta.2+3");
211+
212+
// Complete release
213+
fixture.Checkout("master");
214+
fixture.MergeNoFF("release/2.0.0");
215+
fixture.SequenceDiagram.Destroy("release/2.0.0");
216+
fixture.SequenceDiagram.NoteOver("Release branches are deleted once merged", "release/2.0.0");
217+
218+
//fixture.AssertFullSemver("2.0.0+0");
219+
fixture.ApplyTag("2.0.0");
220+
// fixture.AssertFullSemver("2.0.0");
221+
fixture.MakeACommit();
222+
fixture.Repository.DumpGraph();
223+
// fixture.AssertFullSemver("2.0.1+1");
224+
}
225+
}
179226
}
180227
}
Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,108 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props')" />
4-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5-
<PropertyGroup>
6-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8-
<ProjectGuid>{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}</ProjectGuid>
9-
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>GitTools.Tests</RootNamespace>
12-
<AssemblyName>GitTools.Core.Tests</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<LangVersion>5</LangVersion>
16-
<NuGetPackageImportStamp>
17-
</NuGetPackageImportStamp>
18-
</PropertyGroup>
19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20-
<DebugSymbols>true</DebugSymbols>
21-
<DebugType>full</DebugType>
22-
<Optimize>false</Optimize>
23-
<OutputPath>..\..\output\debug\GitTools.Core.Tests\net45\</OutputPath>
24-
<DefineConstants>TRACE;DEBUG</DefineConstants>
25-
<ErrorReport>prompt</ErrorReport>
26-
<WarningLevel>4</WarningLevel>
27-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
28-
<NoWarn>1591,1701</NoWarn>
29-
</PropertyGroup>
30-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31-
<DebugType>pdbonly</DebugType>
32-
<Optimize>true</Optimize>
33-
<OutputPath>..\..\output\release\GitTools.Core.Tests\net45\</OutputPath>
34-
<DefineConstants>TRACE</DefineConstants>
35-
<ErrorReport>prompt</ErrorReport>
36-
<WarningLevel>4</WarningLevel>
37-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
38-
<NoWarn>1591</NoWarn>
39-
</PropertyGroup>
40-
<ItemGroup>
41-
<Reference Include="Atlassian.Jira, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
42-
<SpecificVersion>False</SpecificVersion>
43-
<HintPath>..\packages\Atlassian.SDK.2.5.0\lib\Atlassian.Jira.dll</HintPath>
44-
</Reference>
45-
<Reference Include="GitTools.Testing, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
46-
<HintPath>..\packages\GitTools.Testing.1.1.1-beta0001\lib\net4\GitTools.Testing.dll</HintPath>
47-
<Private>True</Private>
48-
</Reference>
49-
<Reference Include="LibGit2Sharp, Version=0.23.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
50-
<HintPath>..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll</HintPath>
51-
<Private>True</Private>
52-
</Reference>
53-
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
54-
<HintPath>..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
55-
<Private>True</Private>
56-
</Reference>
57-
<Reference Include="Shouldly, Version=2.7.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
58-
<HintPath>..\packages\Shouldly.2.7.0\lib\net40\Shouldly.dll</HintPath>
59-
<Private>True</Private>
60-
</Reference>
61-
<Reference Include="System" />
62-
<Reference Include="System.Core" />
63-
<Reference Include="System.Net.Http" />
64-
<Reference Include="System.Xml.Linq" />
65-
<Reference Include="System.Data.DataSetExtensions" />
66-
<Reference Include="Microsoft.CSharp" />
67-
<Reference Include="System.Data" />
68-
<Reference Include="System.Xml" />
69-
</ItemGroup>
70-
<ItemGroup>
71-
<Compile Include="..\SolutionAssemblyInfo.cs">
72-
<Link>Properties\SolutionAssemblyInfo.cs</Link>
73-
</Compile>
74-
<Compile Include="Git\Extensions\AuthenticationInfoExtensionsTests.cs" />
75-
<Compile Include="Git\GitDirFinderTests.cs" />
76-
<Compile Include="Git\GitRepositoryHelperTests.cs" />
77-
<Compile Include="Git\DynamicRepositoriesTests.cs" />
78-
<Compile Include="GlobalInitialization.cs" />
79-
<Compile Include="Properties\AssemblyInfo.cs" />
80-
</ItemGroup>
81-
<ItemGroup>
82-
<ProjectReference Include="..\GitTools.Core\GitTools.Core.NET40\GitTools.Core.NET40.csproj">
83-
<Project>{C11252F9-0ECA-44DC-860B-E029C04FBD10}</Project>
84-
<Name>GitTools.Core.NET40</Name>
85-
</ProjectReference>
86-
</ItemGroup>
87-
<ItemGroup>
88-
<None Include="app.config" />
89-
<None Include="packages.config" />
90-
</ItemGroup>
91-
<ItemGroup>
92-
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
93-
</ItemGroup>
94-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
95-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
96-
<PropertyGroup>
97-
<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>
98-
</PropertyGroup>
99-
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props'))" />
100-
</Target>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props')" />
4+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<PropertyGroup>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{0834BE9B-5CDE-4CAB-A683-C70A7D91450B}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>GitTools.Tests</RootNamespace>
12+
<AssemblyName>GitTools.Core.Tests</AssemblyName>
13+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<LangVersion>5</LangVersion>
16+
<NuGetPackageImportStamp>
17+
</NuGetPackageImportStamp>
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>..\..\output\debug\GitTools.Core.Tests\net45\</OutputPath>
24+
<DefineConstants>TRACE;DEBUG</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
28+
<NoWarn>1591,1701</NoWarn>
29+
</PropertyGroup>
30+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>..\..\output\release\GitTools.Core.Tests\net45\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
38+
<NoWarn>1591</NoWarn>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Include="Atlassian.Jira, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
42+
<SpecificVersion>False</SpecificVersion>
43+
<HintPath>..\packages\Atlassian.SDK.2.5.0\lib\Atlassian.Jira.dll</HintPath>
44+
</Reference>
45+
<Reference Include="GitTools.Testing, Version=1.1.1.0, Culture=neutral, processorArchitecture=MSIL">
46+
<HintPath>..\packages\GitTools.Testing.1.1.1-beta0001\lib\net4\GitTools.Testing.dll</HintPath>
47+
<Private>True</Private>
48+
</Reference>
49+
<Reference Include="LibGit2Sharp, Version=0.23.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
50+
<HintPath>..\packages\LibGit2Sharp.0.23.0-pre20150419160303\lib\net40\LibGit2Sharp.dll</HintPath>
51+
<Private>True</Private>
52+
</Reference>
53+
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
54+
<HintPath>..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="Shouldly, Version=2.7.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
58+
<HintPath>..\packages\Shouldly.2.7.0\lib\net40\Shouldly.dll</HintPath>
59+
<Private>True</Private>
60+
</Reference>
61+
<Reference Include="System" />
62+
<Reference Include="System.Core" />
63+
<Reference Include="System.Net.Http" />
64+
<Reference Include="System.Xml.Linq" />
65+
<Reference Include="System.Data.DataSetExtensions" />
66+
<Reference Include="Microsoft.CSharp" />
67+
<Reference Include="System.Data" />
68+
<Reference Include="System.Xml" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<Compile Include="..\SolutionAssemblyInfo.cs">
72+
<Link>Properties\SolutionAssemblyInfo.cs</Link>
73+
</Compile>
74+
<Compile Include="Git\Extensions\AuthenticationInfoExtensionsTests.cs" />
75+
<Compile Include="Git\GitDirFinderTests.cs" />
76+
<Compile Include="Git\GitRepositoryHelperTests.cs" />
77+
<Compile Include="Git\DynamicRepositoriesTests.cs" />
78+
<Compile Include="GlobalInitialization.cs" />
79+
<Compile Include="Properties\AssemblyInfo.cs" />
80+
</ItemGroup>
81+
<ItemGroup>
82+
<ProjectReference Include="..\GitTools.Core\GitTools.Core.NET40\GitTools.Core.NET40.csproj">
83+
<Project>{C11252F9-0ECA-44DC-860B-E029C04FBD10}</Project>
84+
<Name>GitTools.Core.NET40</Name>
85+
</ProjectReference>
86+
</ItemGroup>
87+
<ItemGroup>
88+
<None Include="app.config" />
89+
<None Include="packages.config" />
90+
</ItemGroup>
91+
<ItemGroup>
92+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
93+
</ItemGroup>
94+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
95+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
96+
<PropertyGroup>
97+
<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>
98+
</PropertyGroup>
99+
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props'))" />
100+
</Target>
101101
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
102102
Other similar extension points exist, see Microsoft.Common.targets.
103103
<Target Name="BeforeBuild">
104104
</Target>
105105
<Target Name="AfterBuild">
106106
</Target>
107-
-->
107+
-->
108108
</Project>

src/GitTools.Core.Tests/app.config

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<configuration>
3-
<runtime>
4-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5-
<dependentAssembly>
6-
<assemblyIdentity name="LibGit2Sharp" publicKeyToken="7cbde695407f0333" culture="neutral" />
7-
<bindingRedirect oldVersion="0.0.0.0-0.23.0.0" newVersion="0.23.0.0" />
8-
</dependentAssembly>
9-
</assemblyBinding>
10-
</runtime>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="LibGit2Sharp" publicKeyToken="7cbde695407f0333" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-0.23.0.0" newVersion="0.23.0.0" />
8+
</dependentAssembly>
9+
</assemblyBinding>
10+
</runtime>
1111
</configuration>
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<packages>
3-
<package id="Atlassian.SDK" version="2.5.0" targetFramework="net45" />
4-
<package id="GitTools.Testing" version="1.1.1-beta0001" targetFramework="net45" />
5-
<package id="LibGit2Sharp" version="0.23.0-pre20150419160303" targetFramework="net45" />
6-
<package id="LibGit2Sharp.NativeBinaries" version="1.0.137" targetFramework="net45" />
7-
<package id="NUnit" version="3.2.1" targetFramework="net45" />
8-
<package id="Shouldly" version="2.7.0" targetFramework="net45" />
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Atlassian.SDK" version="2.5.0" targetFramework="net45" />
4+
<package id="GitTools.Testing" version="1.1.1-beta0001" targetFramework="net45" />
5+
<package id="LibGit2Sharp" version="0.23.0-pre20150419160303" targetFramework="net45" />
6+
<package id="LibGit2Sharp.NativeBinaries" version="1.0.137" targetFramework="net45" />
7+
<package id="NUnit" version="3.2.1" targetFramework="net45" />
8+
<package id="Shouldly" version="2.7.0" targetFramework="net45" />
99
</packages>

0 commit comments

Comments
 (0)