if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'):
# replace ~ with _ for tags
version_tag = version.replace('~','_')
- if version_tag.find(":"):
- logger_error('Illegal character ":" in version %s detected. Please use a different version.' % version_tag)
+ if version_tag.find(":") != -1 :
+ logger_error('Illegal character ":" in version "%s" detected. Please use a different version.' % version_tag)
exit_error()
cmd = ['/usr/bin/git', 'tag', version_tag]
try:
subprocess.check_call(cmd)
except:
- logger_error('Could not tag repository with %s.' % version_tag)
+ logger_error('Could not tag repository with "%s".' % version_tag)
exit_error()
cmd = ['/usr/bin/git', 'push', 'origin', version_tag]
try:
subprocess.check_call(cmd)
except:
- logger_error('Could not push tag %s to repository.' % version_tag)
+ logger_error('Could not push tag "%s" to repository.' % version_tag)
exit_error()
- logger.info('Tagged as %s' % version_tag)
+ logger.info('Tagged as "%s".' % version_tag)
try:
# now upload
create_dput_cfg()