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

v1.2 incorrectly reports a new version is available #7

Closed
athisun opened this issue Jan 29, 2021 · 1 comment
Closed

v1.2 incorrectly reports a new version is available #7

athisun opened this issue Jan 29, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@athisun
Copy link

athisun commented Jan 29, 2021

v1.2 incorrectly reports that a new version is available because the info.json hosted at http://pinecil.pine64.org/updater/info.json is outdated, reporting v1.1 as the latest version.

image

Ideally this line would be updated to convert the version string into a float, then make a greater-than comparison to the current version, instead of an inequality check.

https://github.com/pine64/pinecil-firmware-updater/blob/b3762d06609a9384ee9179dd63c786c988382109/mainwindow.cpp#L123

https://doc.qt.io/qt-5/qjsonvalue.html#toDouble

if (json["latest_version"].ToDouble() > 1.2) { 

Note that this method only works for major-minor versioning. Semantic versioning would require splitting the string by '.' and comparing each version component.

@gamelaster gamelaster self-assigned this Jan 29, 2021
@gamelaster gamelaster added the enhancement New feature or request label Jan 29, 2021
@gamelaster
Copy link
Member

Thank you for reporting, I forget to change version on server.

And this idea with double conversion is very good, I will add it in next version.
Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants