Skip to content

Commit 513ae1d

Browse files
author
Jake Ginnivan
committed
Fixing #100
1 parent 8cb9bcd commit 513ae1d

17 files changed

+141
-69
lines changed

AcceptanceTests/NoTagsInRepositorySpecification.RunSpecification.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"BranchType":"Master",
1111
"Sha":"000000000000000000000000000000000000000",
1212
"MajorMinorPatch":"0.1.0",
13-
"SemVer":"0.1.0",
14-
"Version":"0.1.0",
13+
"SemVer":"0.1.0+2",
14+
"Version":"0.1.0+2",
1515
"PreReleasePartTwo":2,
1616
"Stability":"Final"
1717
}
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-

1+
{
2+
"Major":0,
3+
"Minor":1,
4+
"Patch":0,
5+
"Suffix":"",
6+
"LongVersion":"0.1.0 Sha:'000000000000000000000000000000000000000'",
7+
"NugetVersion":"0.1.0",
8+
"ShortVersion":"0.1.0",
9+
"BranchName":"master",
10+
"BranchType":"Master",
11+
"Sha":"000000000000000000000000000000000000000",
12+
"MajorMinorPatch":"0.1.0",
13+
"SemVer":"0.1.0",
14+
"Version":"0.1.0",
15+
"PreReleasePartTwo":2,
16+
"Stability":"Final"
17+
}

AcceptanceTests/NoTagsInRepositoryWithNextVersionTxtSpecification.RunSpecification.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"BranchType":"Master",
1111
"Sha":"000000000000000000000000000000000000000",
1212
"MajorMinorPatch":"0.2.0",
13-
"SemVer":"0.2.0",
14-
"Version":"0.2.0",
13+
"SemVer":"0.2.0+2",
14+
"Version":"0.2.0+2",
1515
"PreReleasePartTwo":2,
1616
"Stability":"Final"
1717
}
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-

1+
{
2+
"Major":0,
3+
"Minor":2,
4+
"Patch":0,
5+
"Suffix":"",
6+
"LongVersion":"0.2.0 Sha:'000000000000000000000000000000000000000'",
7+
"NugetVersion":"0.2.0",
8+
"ShortVersion":"0.2.0",
9+
"BranchName":"master",
10+
"BranchType":"Master",
11+
"Sha":"000000000000000000000000000000000000000",
12+
"MajorMinorPatch":"0.2.0",
13+
"SemVer":"0.2.0",
14+
"Version":"0.2.0",
15+
"PreReleasePartTwo":2,
16+
"Stability":"Final"
17+
}

AcceptanceTests/TagFollowedByCommitsWithApplicableNextVersionTxtSpecification.ForOneCommit.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"BranchType":"Master",
1111
"Sha":"000000000000000000000000000000000000000",
1212
"MajorMinorPatch":"1.1.0",
13-
"SemVer":"1.1.0",
14-
"Version":"1.1.0",
13+
"SemVer":"1.1.0+1",
14+
"Version":"1.1.0+1",
1515
"PreReleasePartTwo":1,
1616
"Stability":"Final"
1717
}
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-

1+
{
2+
"Major":1,
3+
"Minor":1,
4+
"Patch":0,
5+
"Suffix":"",
6+
"LongVersion":"1.1.0 Sha:'000000000000000000000000000000000000000'",
7+
"NugetVersion":"1.1.0",
8+
"ShortVersion":"1.1.0",
9+
"BranchName":"master",
10+
"BranchType":"Master",
11+
"Sha":"000000000000000000000000000000000000000",
12+
"MajorMinorPatch":"1.1.0",
13+
"SemVer":"1.1.0",
14+
"Version":"1.1.0",
15+
"PreReleasePartTwo":1,
16+
"Stability":"Final"
17+
}

AcceptanceTests/TagFollowedByCommitsWithApplicableNextVersionTxtSpecification.ForTenCommitsCommit.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"BranchType":"Master",
1111
"Sha":"000000000000000000000000000000000000000",
1212
"MajorMinorPatch":"1.1.0",
13-
"SemVer":"1.1.0",
14-
"Version":"1.1.0",
13+
"SemVer":"1.1.0+12",
14+
"Version":"1.1.0+12",
1515
"PreReleasePartTwo":12,
1616
"Stability":"Final"
1717
}
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-

1+
{
2+
"Major":1,
3+
"Minor":1,
4+
"Patch":0,
5+
"Suffix":"",
6+
"LongVersion":"1.1.0 Sha:'000000000000000000000000000000000000000'",
7+
"NugetVersion":"1.1.0",
8+
"ShortVersion":"1.1.0",
9+
"BranchName":"master",
10+
"BranchType":"Master",
11+
"Sha":"000000000000000000000000000000000000000",
12+
"MajorMinorPatch":"1.1.0",
13+
"SemVer":"1.1.0",
14+
"Version":"1.1.0",
15+
"PreReleasePartTwo":12,
16+
"Stability":"Final"
17+
}

AcceptanceTests/TagFollowedByCommitsWithNoNextVersionTxtSpecification.RunSpecification.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"BranchType":"Master",
1111
"Sha":"000000000000000000000000000000000000000",
1212
"MajorMinorPatch":"0.1.1",
13-
"SemVer":"0.1.1",
14-
"Version":"0.1.1",
13+
"SemVer":"0.1.1+1",
14+
"Version":"0.1.1+1",
1515
"PreReleasePartTwo":1,
1616
"Stability":"Final"
1717
}
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-

1+
{
2+
"Major":0,
3+
"Minor":1,
4+
"Patch":1,
5+
"Suffix":"",
6+
"LongVersion":"0.1.1 Sha:'000000000000000000000000000000000000000'",
7+
"NugetVersion":"0.1.1",
8+
"ShortVersion":"0.1.1",
9+
"BranchName":"master",
10+
"BranchType":"Master",
11+
"Sha":"000000000000000000000000000000000000000",
12+
"MajorMinorPatch":"0.1.1",
13+
"SemVer":"0.1.1",
14+
"Version":"0.1.1",
15+
"PreReleasePartTwo":1,
16+
"Stability":"Final"
17+
}

AcceptanceTests/TagFollowedByCommitsWithRedundantNextVersionTxtSpecification.WithOneCommit.approved.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"BranchType":"Master",
1111
"Sha":"000000000000000000000000000000000000000",
1212
"MajorMinorPatch":"1.0.4",
13-
"SemVer":"1.0.4",
14-
"Version":"1.0.4",
15-
"PreReleasePartTwo":12,
13+
"SemVer":"1.0.4+1",
14+
"Version":"1.0.4+1",
15+
"PreReleasePartTwo":1,
1616
"Stability":"Final"
1717
}
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-

1+
{
2+
"Major":1,
3+
"Minor":0,
4+
"Patch":4,
5+
"Suffix":"",
6+
"LongVersion":"1.0.4 Sha:'000000000000000000000000000000000000000'",
7+
"NugetVersion":"1.0.4",
8+
"ShortVersion":"1.0.4",
9+
"BranchName":"master",
10+
"BranchType":"Master",
11+
"Sha":"000000000000000000000000000000000000000",
12+
"MajorMinorPatch":"1.0.4",
13+
"SemVer":"1.0.4",
14+
"Version":"1.0.4",
15+
"PreReleasePartTwo":12,
16+
"Stability":"Final"
17+
}

AcceptanceTests/TagFollowedByCommitsWithRedundantNextVersionTxtSpecification.WithTenCommit.approved.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"BranchType":"Master",
1111
"Sha":"000000000000000000000000000000000000000",
1212
"MajorMinorPatch":"1.0.4",
13-
"SemVer":"1.0.4",
14-
"Version":"1.0.4",
15-
"PreReleasePartTwo":10,
13+
"SemVer":"1.0.4+12",
14+
"Version":"1.0.4+12",
15+
"PreReleasePartTwo":12,
1616
"Stability":"Final"
1717
}
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-

1+
{
2+
"Major":1,
3+
"Minor":0,
4+
"Patch":4,
5+
"Suffix":"",
6+
"LongVersion":"1.0.4 Sha:'000000000000000000000000000000000000000'",
7+
"NugetVersion":"1.0.4",
8+
"ShortVersion":"1.0.4",
9+
"BranchName":"master",
10+
"BranchType":"Master",
11+
"Sha":"000000000000000000000000000000000000000",
12+
"MajorMinorPatch":"1.0.4",
13+
"SemVer":"1.0.4",
14+
"Version":"1.0.4",
15+
"PreReleasePartTwo":10,
16+
"Stability":"Final"
17+
}

AcceptanceTests/ToFileSpecification.cs

Lines changed: 0 additions & 44 deletions
This file was deleted.

GitVersion/OutputVariables/VersionBuilders/SemVerVersionBuilder.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ public static string GenerateSemVer(this VersionAndBranch versionAndBranch)
4343
break;
4444
}
4545
}
46-
return string.Format("{0}.{1}.{2}{3}", semVer.Major, semVer.Minor, semVer.Patch, prereleaseString);
46+
return string.Format("{0}.{1}.{2}{3}{4}",
47+
semVer.Major, semVer.Minor, semVer.Patch, prereleaseString,
48+
semVer.PreReleasePartTwo == null ? null : "+" + semVer.PreReleasePartTwo);
4749
}
4850
}
4951
}

Tests/Tests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@
168168
<ItemGroup>
169169
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
170170
</ItemGroup>
171-
<ItemGroup />
171+
<ItemGroup>
172+
<Folder Include="GitHubFlow\" />
173+
</ItemGroup>
172174
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
173175
<PropertyGroup>
174176
<PostBuildEvent>

0 commit comments

Comments
 (0)