Fix tag not matching when there is no v prefix

pull/420/head
Abigail de Joode 2022-08-02 21:53:28 +02:00 committed by GitHub
parent bcc8d4d1c4
commit 3c707c3cdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ namespace UnityBuilderAction.Versioning
/// </summary> /// </summary>
public static string GetTagVersion() public static string GetTagVersion()
{ {
string version = Run(@"tag --points-at HEAD | grep ?[0-9]*"); string version = Run(@"tag --points-at HEAD | grep *[0-9]*");
version = version.Substring(1); version = version.Substring(1);
@ -62,7 +62,7 @@ namespace UnityBuilderAction.Versioning
/// </summary> /// </summary>
static bool HasAnyVersionTags() static bool HasAnyVersionTags()
{ {
return "0" != Run(@"tag --list --merged HEAD | grep ?[0-9]* | wc -l"); return "0" != Run(@"tag --list --merged HEAD | grep *[0-9]* | wc -l");
} }
/// <summary> /// <summary>
@ -92,7 +92,7 @@ namespace UnityBuilderAction.Versioning
/// </summary> /// </summary>
static string GetVersionString() static string GetVersionString()
{ {
return Run(@"describe --tags --long --match ""?[0-9]*"""); return Run(@"describe --tags --long --match ""*[0-9]*""");
// Todo - implement split function based on this more complete query // Todo - implement split function based on this more complete query
// return Run(@"describe --long --tags --dirty --always"); // return Run(@"describe --long --tags --dirty --always");