github: Revert use of API to determine latest version #274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The GitHub API behavior does not work for any repository that has used GitHub releases in the past but only uses tags for newer versions. The original motivation for the change was to prevent pre-releases from being selected as the latest version, but the
--version-regex
flag exists precisely for the purpose of selecting only intended versions (and not unrelated versions, pre-releases, dev tags, etc)As such, the change provided no benefit to the package listed in the motivation, but it did break updates for quite a few packages and has resulted in downgrades and misversioning, among other things
A possible attempt to include the GitHub API could be used to specifically exclude tags associated with pre-releases in the GitHub API, but otherwise continue using tags as the "source of truth" for the latest version. This change does not attempt that as it is only intended to make nix-update work correctly as it did before the change. Feel free to ping me if you attempt to do that as a way forward @jvanbruegge :)
This reverts commits bf33dc4 and 696efb6
Reference #246 (also note #246 (comment)) #269
Fixes #272
Notify @jvanbruegge @Mic92