mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Read SDK version from new semver field
The sdk_version field should stay the ordinary plain number (the major version number of the semver field) so that older Cura versions don't break. Newly built packages will get built with both sdk_version_semver and the normal sdk_version, so that the packages can be read with any Cura version from 3.6 onwards. Contributes to issue CURA-5940.
This commit is contained in:
parent
163f102dda
commit
78e6494430
1 changed files with 2 additions and 1 deletions
|
@ -511,7 +511,8 @@ class Toolbox(QObject, Extension):
|
|||
# version, we also need to check if the current one has a lower SDK version. If so, this package should also
|
||||
# be upgradable.
|
||||
elif remote_version == local_version:
|
||||
can_upgrade = local_package.get("sdk_version", 0) < remote_package.get("sdk_version", 0)
|
||||
# First read sdk_version_semver. If that doesn't exist, read just sdk_version (old version system).
|
||||
can_upgrade = local_package.get("sdk_version_semver", local_package.get("sdk_version", 0)) < remote_package.get("sdk_version_semver", remote_package.get("sdk_version", 0))
|
||||
|
||||
return can_upgrade
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue