Skip to content

Commit 8b901a8

Browse files
committed
Set tags sorting
1 parent 0f9e27e commit 8b901a8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/Build.Changelog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ StringBuilder CreateChangelogBuilder()
2424
void WriteGitHubCompareUrl(StringBuilder changelogBuilder)
2525
{
2626
var tags = GitTasks
27-
.Git("tag --list", logInvocation: false, logOutput: false)
27+
.Git("tag -l --sort=v:refname", logInvocation: false, logOutput: false)
2828
.ToArray();
2929

3030
if (tags.Length < 2) return;

build/Build.Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sealed partial class Build
6969
/// <remarks>
7070
/// Can be used to compare versions or analyze changes between versions.
7171
/// </remarks>
72-
string PreviousReleaseVersion => GitTasks.Git("tag --list", logInvocation: false, logOutput: false).ToArray() switch
72+
string PreviousReleaseVersion => GitTasks.Git("tag -l --sort=v:refname", logInvocation: false, logOutput: false).ToArray() switch
7373
{
7474
var tags when tags.Length >= 2 => tags[^2].Text,
7575
var tags when tags.Length == 0 => throw new InvalidOperationException("The pipeline must be triggered by pushing a new tag"),

0 commit comments

Comments
 (0)