Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d404034f9 |
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user