Skip to content

Commit

Permalink
SW-988 change octoprint to fix version comparision (mrbeam#116)
Browse files Browse the repository at this point in the history
* remove the sensitization of the version as we need the '-xxx' part (related Octoprint PR: OctoPrint#4389)
* remove the leading v that we use in Mr Beam versions so can use the semantic versioning comparison
  • Loading branch information
Josef-MrBeam authored Mar 22, 2022
1 parent 8ae5f09 commit c72c887
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ def _get_sanitized_version(version_string):
>>> _get_sanitized_version(None)
>>> _get_sanitized_version("1.2.15")
'1.2.15'
>>> _get_sanitized_version("1.2.15-dev12")
'1.2.15'
>>> _get_sanitized_version("v1.2.15-dev12")
'1.2.15-dev12'
"""

if version_string is not None and "-" in version_string:
version_string = version_string[:version_string.find("-")]
if version_string[0].lower() == "v":
version_string = version_string[1:]
return version_string


Expand Down

0 comments on commit c72c887

Please sign in to comment.