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

Pre-release version precedence broken (osx) #102

Open
salomvary opened this issue Sep 20, 2016 · 6 comments
Open

Pre-release version precedence broken (osx) #102

salomvary opened this issue Sep 20, 2016 · 6 comments

Comments

@salomvary
Copy link

Given a single released version 1.0.0-alpha.2 and the application running at the same version, I expect the /update/osx/:currentVersion endpoint to return 204 No content. What I get back instead is the same version.

This does not conform Semver 11:
"Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order."

Example: https://gist.github.com/salomvary/25fd60240ea32ce6ac2698430bf56586

@ariporad
Copy link

I'm running in to this as well... Does anyone know how I might fix this? Thanks!

@halfbyte
Copy link

halfbyte commented Jan 24, 2017

I believe, the change that broke this is discussed here.

Looks like #100 actually fixes that, so hopefully it's just a matter of time.

@EtienneLem
Copy link

It may be a naive (and/or temporary) fix, but missive/nuts@2089abf seems to have fixed that for us.

@julienma
Copy link

julienma commented May 8, 2017

I've cherry-picked missive@2089abf and indeed confirm this fixes the issue of the latest channel update wanted to download itself (e.g. /update/osx/2.0.0-beta pointing to 2.0.0-beta, instead of returning a 204).

However, this introduces a new issue, where a stable version does not take precedence over its channel (e.g. beta) counterpart:
/update/channel/stable/osx/2.0.0-beta returns a 204 whereas I was expecting a download of 2.0.0.

If #100 fixes that, then how can we help merging it?

@julienma
Copy link

julienma commented May 8, 2017

Update: I've tested PR #100, which seems like the exact answer to my scenarios (at least fixes what I've observed looks exactly like #95 and #102).

@10n37
Copy link

10n37 commented Nov 5, 2022

Still facing the same problem.
semver('1.5.6-beta', '>=1.2.3-beta') returns false 😢

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

6 participants