fix getting-tag-from-git

This commit is contained in:
jem 2021-07-02 14:15:42 +02:00
parent 98002c4e5e
commit 8f521e5159

View file

@ -13,7 +13,11 @@ def get_devops_build(project):
return project.get_property('devops_build')
def get_tag_from_latest_commit():
return run('git describe --abbrev=0 --tags --exact-match', shell=True, capture_output=True).stdout.decode('UTF-8').rstrip()
value = run('git describe --abbrev=0 --tags --exact-match', shell=True,
capture_output=True)
if value.returncode != 0:
return None
return value.stdout.decode('UTF-8').rstrip()
class DevopsBuild: