set_build regex

This commit is contained in:
Jack Robison 2018-10-22 22:27:57 -04:00
parent 01baa193d5
commit 18a0204105
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -17,9 +17,9 @@ def main():
def get_build(): def get_build():
try: try:
tag = subprocess.check_output(['git', 'describe', '--exact-match', '--all']).strip() tag = subprocess.check_output(['git', 'describe', '--exact-match', '--all']).strip()
if re.match('v\d+\.\d+\.\d+rc\d+', tag.decode()): if re.match('tags\/v\d+\.\d+\.\d+rc\d+$', tag.decode()):
return 'rc' return 'rc'
elif re.match('v\d+\.\d+\.\d+$', tag.decode()): elif re.match('tags\/v\d+\.\d+\.\d+$', tag.decode()):
return 'release' return 'release'
return 'qa' return 'qa'
except subprocess.CalledProcessError: except subprocess.CalledProcessError: