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

[BUG] Wrong sorting of versions #126

Closed
eluchsinger opened this issue Jul 9, 2019 · 5 comments
Closed

[BUG] Wrong sorting of versions #126

eluchsinger opened this issue Jul 9, 2019 · 5 comments

Comments

@eluchsinger
Copy link

I have a version 1.9 that is listed before 1.14.

Right now it is:

  • 1.9
  • 1.8
  • 1.7
  • ...
  • 1.2
  • 1.14
  • 1.13
@eluchsinger eluchsinger changed the title Wrong sorting of versions [BUG] Wrong sorting of versions Jul 9, 2019
@ljharb
Copy link
Contributor

ljharb commented Jul 9, 2019

fwiw a version includes the patch number; omitting it makes it invalid semver.

@cookpete
Copy link
Owner

cookpete commented Jul 9, 2019

Numeric versions (without the v prefix) are sorted numerically here:

https://github.com/CookPete/auto-changelog/blob/85bd07328c0871b230f4a8309ba79e05d32fe46f/src/releases.js#L56-L58

I guess that needs changing to infer semver even without the v prefix, now that we have that feature.

@eluchsinger
Copy link
Author

I didn't completely understand if this is a bug or it's desired behavior.

I am using GitVersion. The Version numbers are generated automatically... I have to investigate, what is causing the missing patch number.

@cookpete
Copy link
Owner

I am using GitVersion. The Version numbers are generated automatically

It might just be that GitVersion doesn't use semver for some reason, which is fine.

I think it's ok to update the logic and assume that 1.14 will always be a later version than 1.2.

@cookpete
Copy link
Owner

This should be fixed in [email protected]

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

No branches or pull requests

3 participants