Skip to content

Commit da7882e

Browse files
committed
use Int32 not int
1 parent 65b7b68 commit da7882e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersion.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace GitVersion
66
public class SemanticVersion : IFormattable, IComparable<SemanticVersion>
77
{
88
private static SemanticVersion Empty = new SemanticVersion();
9-
109
private static readonly Regex ParseSemVer = new Regex(
1110
@"^(?<SemVer>(?<Major>\d+)?(\.(?<Minor>\d+))?(\.(?<Patch>\d+))?)(\.(?<FourthPart>\d+))?(-(?<Tag>[^\+]*))?(\+(?<BuildMetaData>.*))?$",
1211
RegexOptions.Compiled);
@@ -166,22 +165,22 @@ public static bool TryParse(string version, string tagPrefixRegex, out SemanticV
166165
var fourthPart = parsed.Groups["FourthPart"];
167166
if (fourthPart.Success && semanticVersionBuildMetaData.CommitsSinceTag == null)
168167
{
169-
semanticVersionBuildMetaData.CommitsSinceTag = int.Parse(fourthPart.Value);
168+
semanticVersionBuildMetaData.CommitsSinceTag = Int32.Parse(fourthPart.Value);
170169
}
171170

172171
int major = 0, minor = 0, patch = 0;
173172

174-
if (!parsed.Groups["Major"].Success || !int.TryParse(parsed.Groups["Minor"].Value, out major))
173+
if (!parsed.Groups["Major"].Success || !Int32.TryParse(parsed.Groups["Minor"].Value, out major))
175174
{
176175
return false;
177176
}
178177

179-
if (parsed.Groups["Minor"].Success && !int.TryParse(parsed.Groups["Minor"].Value, out minor))
178+
if (parsed.Groups["Minor"].Success && !Int32.TryParse(parsed.Groups["Minor"].Value, out minor))
180179
{
181180
return false;
182181
}
183182

184-
if (parsed.Groups["Patch"].Success && !int.TryParse(parsed.Groups["Minor"].Value, out patch))
183+
if (parsed.Groups["Patch"].Success && !Int32.TryParse(parsed.Groups["Minor"].Value, out patch))
185184
{
186185
return false;
187186
}

0 commit comments

Comments
 (0)