Skip to content

Commit

Permalink
Fix latest package resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
JLChnToZ committed Nov 20, 2024
1 parent 68d8c9d commit 635b9a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PackageBuilder/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using VRC.PackageManagement.Core.Types.Packages;
using ProductHeaderValue = Octokit.ProductHeaderValue;
using ListingSource = VRC.PackageManagement.Automation.Multi.ListingSource;
using SemVer = SemanticVersioning.Version;

namespace VRC.PackageManagement.Automation
{
Expand Down Expand Up @@ -234,7 +235,7 @@ ListingSource MakeListingSourceFromManifest(VRCPackageManifest manifest)

Serilog.Log.Information($"Made listingInfo {JsonConvert.SerializeObject(listingInfo, JsonWriteOptions)}");

var latestPackages = packages.OrderByDescending(p => p.Version).DistinctBy(p => p.Id).ToList();
var latestPackages = packages.OrderByDescending(p => new SemVer(p.Version, true)).DistinctBy(p => p.Id).ToList();
Serilog.Log.Information($"LatestPackages: {JsonConvert.SerializeObject(latestPackages, JsonWriteOptions)}");
var formattedPackages = latestPackages.ConvertAll(p => new {
Name = p.Id,
Expand Down

0 comments on commit 635b9a0

Please sign in to comment.