1 Commits
0.1.5 ... 0.1.6

Author SHA1 Message Date
Matthias Langhard
0d404034f9 feat: improving push-functionality 2021-11-03 08:28:52 +01:00
3 changed files with 16 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ namespace Application.Commands
protected override async Task Handle(Command request, CancellationToken cancellationToken)
{
await _gitRepoWriteService.PushTags(request.RepoPath);
await _gitRepoWriteService.Push(request.RepoPath);
}
}

View File

@@ -5,6 +5,7 @@ namespace Application.Interfaces
public interface IGitRepoWriteService
{
void AddTag(string repoPath, string tag);
Task Push(string repoPath);
Task<string> PushTags(string repoPath);
Task<string> Push(string repoPath);
}
}

View File

@@ -14,12 +14,23 @@ namespace Infrastructure.Services
repo.ApplyTag(tag);
}
public async Task Push(string repoPath)
public async Task<string> PushTags(string repoPath)
{
await Cli.Wrap("git")
var result = await Cli.Wrap("git")
.WithArguments("push --tags")
.WithWorkingDirectory(repoPath)
.ExecuteBufferedAsync();
return result.StandardOutput.Trim();
}
public async Task<string> Push(string repoPath)
{
var result = await Cli.Wrap("git")
.WithArguments("push")
.WithWorkingDirectory(repoPath)
.ExecuteBufferedAsync();
return result.StandardOutput.Trim();
}
}
}