'This is not allowed, failing...')
# .. and update changelog if we trust the package
+ add_changelog_entry = False
if do_autoincrement:
logger.info('This is an autoincrementing project.')
+ add_changelog_entry = True
try:
logger.debug(subprocess.check_call([BIN_DCH, '-i', 'Released by jenkins.']))
logger.debug(subprocess.check_call([BIN_GIT_DCH, '-R', '-a', '--spawn-editor=none']))
logger.info('Project is not respected by autoincrement.')
cl = changelog.Changelog()
cl.parse_changelog(open('debian/changelog'))
- if new_dist != cl.distributions or new_version != cl.full_version:
+ add_changelog_entry = new_dist != cl.distributions or new_version != cl.full_version
+ if add_changelog_entry:
cmd = [
BIN_DCH,
'--newversion',
# .. remove last commit (the one where we added the changelog entry)
# FIXME: when 'merge': reset only on original branch?
# change checkout back to original branch?
- logger.info('Reset repository to HEAD~1 to revert develop changelog entry.')
- logger.debug(gitrepo.git.reset('--soft', 'HEAD~1'))
+ if add_changelog_entry:
+ logger.info('Reset repository to HEAD~1 to revert develop changelog entry.')
+ logger.debug(gitrepo.git.reset('--soft', 'HEAD~1'))
# .. and finally handle the result
if ret: