Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
Possible solution to #209 on staging (#211)
Browse files Browse the repository at this point in the history
* Fix #209

* Added some reasoning

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
  • Loading branch information
johnoliver and karianna committed May 21, 2020
1 parent 04f84bf commit 9ab569b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ open class PackageEndpoint {
val binaryFilter = BinaryFilter(os, arch, image_type, jvm_impl, heap_size, project)
val releases = APIDataStore.getAdoptRepos().getFilteredReleases(releaseFilter, binaryFilter, SortOrder.DESC).toList()

// We use updated_at and timestamp as well JIC we've made a mistake and respun the same version number twice, in which case newest wins.
val comparator = VERSION_COMPARATOR.thenBy { it.version_data.optional }
.thenBy { it.updated_at }
.thenBy { it.timestamp }

return releases.sortedWith(comparator)
}
Expand Down

0 comments on commit 9ab569b

Please sign in to comment.