Skip to content

Fix tag comparison (numerical order) #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sgrimard
Copy link

@sgrimard sgrimard commented Sep 5, 2022

Tag comparison was done using alphabetical ordering instead of numerical ordering.
This won't work for releases that uses numbers over 9.
Casting each version component to an int will force numerical ordering.

The bug can easily be reproduced by creating a dummy repository and adding tags "0.9.0" and "0.10.0".
"0.9.0"will be seen as the latest by error.

Tag comparison was done using alphabetical ordering instead of numerical ordering.
This won't work for releases that uses numbers over 9.
Casting each version component to an int will force numerical ordering.

The bug can easily be reproduced by creating a dummy repository and adding tags "0.9.0" and "0.10.0".
"0.9.0"will be seen as the latest by error.
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.

1 participant