Closed paulo-haas closed 3 months ago
Is this sorting guaranteed with multiple digits, or is it purely alphabetical? I.e. does 1.10.0
sort before or after 1.8.5
?
Ah it seems it’s alphabetical, look for example at Firefox, where the 96.x versions come after all the ≥ 100.x versions:
https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Mozilla/Firefox
Probably need some smarter sorting to merge this.
The winget API doesn’t look particularly up to date either.
Oh, yeah, it is sorted alphabetically. I somehow did not think about that. So my solution will break earlier than expected. You could also never go beyond 9.9 :-D But I give myself a gold star for my effort :'-)
The winget API of winget.run is not an official API and seems to be abandoned. There are many issues with out-of-date packages.
I did not find any alternative solution right now, but I will keep this problem in mind and get back to it.
This PR fixes the winget badge issue. Repology no longer tracks the winget repository (Issue #1392).
This solution leverages the GitHub API to fetch the contents of the pympress winget directory and displays the name of the last. The contents of the winget directory are named and sorted by version. This solution works as long as the versioning sticks to the semantic versioning rules, but might need adjustments in the future.