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

Fixing newerVersion() #39

Merged
merged 1 commit into from
Mar 18, 2022
Merged

Fixing newerVersion() #39

merged 1 commit into from
Mar 18, 2022

Conversation

Ballasi
Copy link
Contributor

@Ballasi Ballasi commented Mar 17, 2022

The function sometimes accepts version tags as newer versions even though it is not the case, the whole function has been rewritten to work as follows:

  • checks every number between dots one by one
  • if it is a number (or 'r' + number) and it is different, then it returns the comparison of the number
  • if it is the same number, then it ignores and iterate to the next number
  • if it is not a number but a commit hash, it returns true if is different. In all cases, commit hashes must be placed at the end of version tags so a complete return would work as intended

A series of tests has been done on this function and can be run online, with comparison with the previous implementation:
https://go.dev/play/p/QUm8zPl_Ngw

Fixes #31

The function sometimes accepts version tags as newer versions even
though it is not the case, the whole function has been rewritten to work
as follows:

- checks every number between dots one by one
- if it is a number (or 'r' + number) and it is different, then it
  returns the comparison of the number
- if it is the same number, then it ignores and iterate to the next
  number
- if it is not a number but a commit hash, it returns true if is
  different. In all cases, commit hashes must be placed at the end of
  version tags so a complete return would work as intended

A series of tests has been done on this function and can be run online,
with comparison with the previous implementation:
https://go.dev/play/p/QUm8zPl_Ngw

Fixes ericm#31
@ericm ericm merged commit 53fcdd4 into ericm:master Mar 18, 2022
@Ballasi Ballasi deleted the fix/newerVersion branch May 13, 2023 12:58
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.

Some AUR packages are in to update instead of previous section
2 participants