Skip to content

Commit

Permalink
Ignore a leading v or V in github release tags.
Browse files Browse the repository at this point in the history
This fixes OctoPrint#1723 .
  • Loading branch information
eyal0 committed Jan 21, 2017
1 parent 1014712 commit 0fa8d1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/octoprint/plugins/pluginmanager/__init__.py
Expand Up @@ -667,6 +667,9 @@ def _get_octoprint_version(self, base=False):
if isinstance(octoprint_version, tuple):
# old setuptools
base_version = []
# A leading v is common in github release tags. Remove it.
if len(version_tuple) > 1 and version_tuple[0].lower == "*v":
version_tuple = version_tuple[1:]
for part in octoprint_version:
if part.startswith("*"):
break
Expand Down
Expand Up @@ -140,6 +140,9 @@ def _get_base_from_version_tuple(version_tuple):
"""

base_version = []
# A leading v is common in github release tags. Remove it.
if len(version_tuple) > 1 and version_tuple[0].lower == "*v":
version_tuple = version_tuple[1:]
for part in version_tuple:
if part.startswith("*"):
break
Expand Down

0 comments on commit 0fa8d1c

Please sign in to comment.