Skip to content

Commit

Permalink
Fix for new repos.
Browse files Browse the repository at this point in the history
  • Loading branch information
willson556 committed Mar 9, 2023
1 parent 39a1182 commit 1d00d85
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions staflversion/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ def __init__(self, git: GitWrapper):
self._git = git

def determine_version(self) -> StaflVersion:
new_commit_messages = self._git.get_commit_messages_since_tag()
tags = self._git.get_tags()

if tags:
new_commit_messages = self._git.get_commit_messages_since_tag()
else:
new_commit_messages = []

set_version_matches = [
self._SET_VERSION.match(message)
Expand All @@ -105,7 +110,7 @@ def determine_version(self) -> StaflVersion:

versions = [
StaflVersion.parse(t)
for t in self._git.get_tags()
for t in tags
if StaflVersion.try_parse(t) is not None
]
versions.sort(reverse=True)
Expand Down

0 comments on commit 1d00d85

Please sign in to comment.