add some randomness to tag

to allow multiple patches with the same source to be created
This commit is contained in:
IsWaffle 2024-03-29 11:12:31 -04:00
parent 66580eed52
commit 9f0369bbd6
2 changed files with 5 additions and 3 deletions

View File

@ -5,8 +5,8 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyVersion>1.5.9</AssemblyVersion>
<FileVersion>1.5.9</FileVersion>
<AssemblyVersion>1.5.10</AssemblyVersion>
<FileVersion>1.5.10</FileVersion>
</PropertyGroup>
<ItemGroup>

View File

@ -64,9 +64,11 @@ namespace EftPatchHelper.Tasks
string releaseName = $"{sourceTail} to {targetTail}";
string tag = $"{sourceTail}_{new Random().Next(100, 999)}";
try
{
var release = repo.RepoCreateRelease(_settings.GiteaReleaseRepoOwner, _settings.GiteaReleaseRepoName, new CreateReleaseOption(null, false, releaseName, false, sourceTail, null));
var release = repo.RepoCreateRelease(_settings.GiteaReleaseRepoOwner, _settings.GiteaReleaseRepoName, new CreateReleaseOption(null, false, releaseName, false, tag, null));
AnsiConsole.MarkupLine($"[green]Release added: {release.Name.EscapeMarkup()}[/]");