fix getting-tag-from-git
This commit is contained in:
parent
98002c4e5e
commit
8f521e5159
1 changed files with 5 additions and 1 deletions
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in a new issue