Skip to content

Commit

Permalink
fix: better exception handling when could not get the version from gi…
Browse files Browse the repository at this point in the history
…t tags (#476)
  • Loading branch information
artemrys authored Jul 4, 2022
1 parent 7432949 commit 2aafc09
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion splunk_add_on_ucc_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,15 @@ def _generate(source, config, ta_version, outputdir=None):
else:
stage = version.stage[:1]

version_str = version.serialize(metadata=True, style=Style.SemVer)
try:
version_str = version.serialize(metadata=True, style=Style.SemVer)
except ValueError:
logger.error(
"Could not find the proper version from git tags. "
"Check out "
"https://github.com/splunk/addonfactory-ucc-generator/issues/404"
)
exit(1)
version_splunk = f"{version.base}{stage}{version.commit}"
ta_version = version_splunk
else:
Expand Down

0 comments on commit 2aafc09

Please sign in to comment.