Create VersionApplicator

This commit is contained in:
Webber
2020-04-22 00:05:46 +02:00
committed by Webber Takken
parent 03510d4a55
commit 5ee9c59113
3 changed files with 83 additions and 0 deletions

View File

@@ -30,6 +30,22 @@ namespace UnityBuilderAction.Versioning
return version;
}
/// <summary>
/// Get the version of the current tag.
///
/// Output Format:
/// #.* (where # is the major version and * can be any number of any type of character)
/// </summary>
/// <returns></returns>
public static string GenerateSemanticClassicVersion()
{
string version = Run(@"tag --points-at HEAD | grep v[0-9]*");
version = version.Substring(1);
return version;
}
/// <summary>
/// Get the total number of commits.
/// </summary>