Skip to content

Commit

Permalink
Merge pull request #1 from seesharper/bugfix-ordering
Browse files Browse the repository at this point in the history
Order latest version by NuGet version
  • Loading branch information
seesharper committed Mar 16, 2020
2 parents 64ea57a + 3186af8 commit 17f3040
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Dotnet.Deps.Core/NuGet/ILatestVersionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ private async Task GetLatestVersion(string packageName, bool preRelease, SourceR

if (preRelease)
{
latestVersionInRepository = allVersions.LastOrDefault();
latestVersionInRepository = allVersions.OrderBy(nv => nv).LastOrDefault();
}
else
{
latestVersionInRepository = allVersions.Where(v => !v.IsPrerelease).LastOrDefault();
latestVersionInRepository = allVersions.Where(v => !v.IsPrerelease).OrderBy(nv => nv).LastOrDefault();
}

if (latestVersionInRepository != null)
Expand Down
2 changes: 1 addition & 1 deletion src/Dotnet.Deps/Dotnet.Deps.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/seesharper/dotnet-deps.git</RepositoryUrl>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 17f3040

Please sign in to comment.