Skip to content

Commit

Permalink
Do not raise error for branch ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
tillahoffmann committed Jul 6, 2022
1 parent 2228e46 commit b61ddf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion version.py
Expand Up @@ -15,8 +15,10 @@ def __main__():
with open("VERSION", "w") as fp:
fp.write(version)
print(f"wrote version {version} to VERSION file")
elif re.match(r"^refs/heads/", ref):
print(f"ref {ref} is not a tag")
else:
raise ValueError(f"cannot extract version from ref {ref}")
raise ValueError(f"unexpected reference {ref}")


if __name__ == "__main__":
Expand Down

0 comments on commit b61ddf7

Please sign in to comment.