Skip to content

Commit

Permalink
Merge pull request #460 from serverlessworkflow/fix-version-ordering
Browse files Browse the repository at this point in the history
Fixed the `WorkflowDefinitionEnumerableExtensions` by using the `SemVersio.PrecendenceComparer` when ordering versions of a workflow
  • Loading branch information
cdavernas authored Dec 6, 2024
2 parents 40914e3 + 7106d85 commit 3675880
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class WorkflowDefinitionEnumerableExtensions
/// </summary>
/// <param name="definitions">An <see cref="IEnumerable{T}"/> containing the <see cref="WorkflowDefinition"/>s to get the latest of</param>
/// <returns>The latest <see cref="WorkflowDefinition"/></returns>
public static WorkflowDefinition GetLatest(this IEnumerable<WorkflowDefinition> definitions) => definitions.OrderByDescending(wf => SemVersion.Parse(wf.Document.Version, SemVersionStyles.Strict)).First();
public static WorkflowDefinition GetLatest(this IEnumerable<WorkflowDefinition> definitions) => definitions.OrderByDescending(wf => SemVersion.Parse(wf.Document.Version, SemVersionStyles.Strict), SemVersion.PrecedenceComparer).First();

/// <summary>
/// Gets the specified <see cref="WorkflowDefinition"/> version
Expand Down

0 comments on commit 3675880

Please sign in to comment.