Skip to content

Commit

Permalink
Skip versions if tag- and release-name yield different version-numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudin committed Jul 3, 2018
1 parent bfdbf72 commit a2528c8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,16 @@ def analyse_release(release: dict, project_name: str) -> Optional[dict]:
""" Heuristics to find the version number """
match_tag_name = extract_version(release["tag_name"] or "", project_name)
match_name = extract_version(release["name"] or "", project_name)
if match_tag_name is not None:
if (
match_tag_name is not None
and match_name is not None
and match_tag_name != match_name
):
logger.warning(
"Conflicting versions {} and {}".format(match_tag_name, match_name)
)
return None
elif match_tag_name is not None:
release_type, version = match_tag_name
original_version = release["tag_name"]
elif match_name is not None:
Expand Down

0 comments on commit a2528c8

Please sign in to comment.