Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed winget badge #322

Closed
wants to merge 1 commit into from
Closed

Fixed winget badge #322

wants to merge 1 commit into from

Conversation

paulo-haas
Copy link
Contributor

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.

@Cimbali
Copy link
Owner

Cimbali commented Jul 23, 2024

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?

@Cimbali
Copy link
Owner

Cimbali commented Jul 23, 2024

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.

@Cimbali
Copy link
Owner

Cimbali commented Jul 23, 2024

The winget API doesn’t look particularly up to date either.

@paulo-haas
Copy link
Contributor Author

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.

@paulo-haas paulo-haas closed this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants