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

feat: properly compare versions with commit SHA #1504

Merged
merged 1 commit into from
Nov 22, 2019

Conversation

aleclarson
Copy link

When two versions have the same major/minor/patch numbers (eg: 1.5.5-335d3e2 and 1.5.5-a655360), the newer version is used (determined by its date property).

@kornelski kornelski merged commit 8f6c7cc into sparkle-project:master Nov 22, 2019
@kode54
Copy link

kode54 commented Mar 1, 2020

Yeah, this commit breaks version comparison in my project, because my versions are based on a Git tag:

tagname-commitcount-ghash

@kornelski
Copy link
Member

I'm surprised that your scheme has worked before. I don't think Sparkle should be adding support for more complicated versions. Your case of having the same version for all releases is an edge case. You should be increasing the version, not just commit count.

@kode54
Copy link

kode54 commented Mar 1, 2020

How about I just increment a decimal point by one, per every published release, forever more? Is that sufficient?

@kornelski
Copy link
Member

Yes, if you keep incrementing the "patch" part of the version, it'll be fine. These are 3 numbers, not a decimal fraction.

@kode54
Copy link

kode54 commented Mar 2, 2020

I changed my versioning scheme, and it works out fine for Sparkle 1.23.0. The only issues I've had so far now are with my own maintenance scripts.

zorgiepoo added a commit that referenced this pull request May 1, 2021
On second thought I realized we can support this without doing any date comparison because the code just picks the first item if two are equal.
zorgiepoo added a commit that referenced this pull request May 2, 2021
Port #1504 (dash separators in version strings) to 2.x
lluuaapp pushed a commit to elgatosf/Sparkle that referenced this pull request Aug 20, 2021
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.

3 participants