feat: implements option to add a service-name when initializing first tag

This commit is contained in:
Matthias Langhard
2021-11-04 08:22:09 +01:00
parent bbf09be431
commit 9c313526e7
2 changed files with 15 additions and 1 deletions

View File

@@ -103,6 +103,15 @@ namespace Cli
new Selection("no", null)
)
);
var serviceName = AnsiConsole.Prompt(
new TextPrompt<string>("[grey][[Optional]][/] Enter [green]service name[/]:")
.AllowEmpty()
);
if (!string.IsNullOrWhiteSpace(serviceName))
{
selection.Version.SetService(serviceName.Trim());
}
}
if (selection.Version == null)

View File

@@ -57,7 +57,7 @@ namespace Application.Models
public int Minor { get; private set; }
public int Patch { get; private set; }
public int? Rc { get; private set; }
public string Service { get; }
public string Service { get; private set; }
public override string ToString()
@@ -198,5 +198,10 @@ namespace Application.Models
{
return Rc != null;
}
public void SetService(string service)
{
Service = service;
}
}
}