Skip to content

Commit

Permalink
fix: SemVersion comparer
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnkwlp committed Nov 25, 2024
1 parent 3a88257 commit e716dd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Git-CI-Tools/Git-CI-Tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<RootNamespace>Git_CI_Tools</RootNamespace>
<Authors>Passingwind</Authors>
<PackAsTool>true</PackAsTool>
Expand Down
8 changes: 4 additions & 4 deletions Git-CI-Tools/GitContextHelper.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System;
using Pastel;
using Semver;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using Pastel;
using Semver;

namespace Git_CI_Tools;

Expand Down Expand Up @@ -53,7 +53,7 @@ public static Dictionary<SemVersion, GitTags> GetVersionsFromTags(IEnumerable<Gi
result = result.Where(x => string.IsNullOrEmpty(x.Key.Prerelease)).ToList();
}

return result.OrderByDescending(x => x.Key).ToDictionary(x => x.Key, x => x.Value);
return result.OrderByDescending(x => x.Key, SemVersion.SortOrderComparer).ToDictionary(x => x.Key, x => x.Value);
}

public static GitTags FindLatestTag(GitContext git, bool includePrerelease = false)
Expand Down

0 comments on commit e716dd3

Please sign in to comment.