Skip to content

Commit

Permalink
Using mocked version 0.0.0 for testing instead of unknown.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail committed Feb 12, 2024
1 parent 7754514 commit 5c50552
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions octoprint_octorelay/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def get_version(version_file=STATIC_VERSION_FILE):
if not version:
version = get_version_from_git_archive(version_info)
if not version:
version = Version("unknown", None, None)
# version = Version("unknown", None, None)
version = Version("0.0.0", None, None)
return pep440_format(version)
else:
return version
Expand Down Expand Up @@ -95,7 +96,8 @@ def get_version_from_git():
except ValueError: # No tags, only the git hash
# prepend 'g' to match with format returned by 'git describe'
git = "g{}".format(*description)
release = "unknown"
# release = "unknown"
release = "0.0.0"
dev = None

labels = []
Expand Down Expand Up @@ -141,7 +143,8 @@ def get_version_from_git_archive(version_info):
release, *_ = sorted(version_tags) # prefer e.g. "2.0" over "2.0rc1"
return Version(release, dev=None, labels=None)
else:
return Version("unknown", dev=None, labels=["g{}".format(git_hash)])
# return Version("unknown", dev=None, labels=["g{}".format(git_hash)])
return Version("0.0.0", dev=None, labels=["g{}".format(git_hash)])


__version__ = get_version()
Expand Down

0 comments on commit 5c50552

Please sign in to comment.