# build was succesful, now let's tag it
if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'):
cmd = ['/usr/bin/git', 'tag', version]
- subprocess.check_call(cmd)
+ try:
+ subprocess.check_call(cmd)
+ except:
+ logger_error('Could not tag repository.')
+ exit_error()
cmd = ['/usr/bin/git', 'push', 'origin', version]
- subprocess.check_call(cmd)
- # FIXME: intercept failures
+ try:
+ subprocess.check_call(cmd)
+ except:
+ logger_error('Could not push tag.')
+ exit_error()
+ # finally
exit_ok()