mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
enhance: tag creation & pushing (#141)
* supports creating lightweight tags * supports GPG signed tags * add option to push selected tag to all remotes
This commit is contained in:
parent
0dea7ed0e2
commit
b556feb3d3
11 changed files with 122 additions and 42 deletions
|
@ -5,12 +5,22 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public static class Tag
|
||||
{
|
||||
public static bool Add(string repo, string name, string basedOn, string message)
|
||||
public static bool Add(string repo, string name, string basedOn)
|
||||
{
|
||||
var cmd = new Command();
|
||||
cmd.WorkingDirectory = repo;
|
||||
cmd.Context = repo;
|
||||
cmd.Args = $"tag -a {name} {basedOn} ";
|
||||
cmd.Args = $"tag {name} {basedOn}";
|
||||
return cmd.Exec();
|
||||
}
|
||||
|
||||
public static bool Add(string repo, string name, string basedOn, string message, bool sign)
|
||||
{
|
||||
var param = sign ? "-s -a" : "-a";
|
||||
var cmd = new Command();
|
||||
cmd.WorkingDirectory = repo;
|
||||
cmd.Context = repo;
|
||||
cmd.Args = $"tag {param} {name} {basedOn} ";
|
||||
|
||||
if (!string.IsNullOrEmpty(message))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue