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

add intdot as version scheme #166

Open
tschmidtb51 opened this issue Apr 27, 2022 · 1 comment
Open

add intdot as version scheme #166

tschmidtb51 opened this issue Apr 27, 2022 · 1 comment

Comments

@tschmidtb51
Copy link
Contributor

I suggest to add a version scheme intdot that is defined as follows:
To compare 2 versions a and b, do:

A = a.split('.'); B = b.split('.')   // split each version on .
for i in 0..min(len(a), len(b):
  if (int(a[i]) > int(b[i])):
     return 'A greater than B'
   elseif (int(a[i]) < int(b[i])):
     return 'B greater than A'

if len(a) > len(b):
  return 'A greater than B'
if len(b) > len(a):
  return 'B greater than A'
return 'A matches B'

This will cover 80% of the currently used version schemes that do not follow one of the well-known version-schemes.

Thoughts?

Flagging @pombredanne for comments.

@tschmidtb51
Copy link
Contributor Author

@pombredanne What would be the process to get this included?

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

1 participant