cl.parse_changelog(open('debian/changelog'))
new_version = cl.full_version
new_tag = new_version.replace('~', '_').replace(':', ',')
- add_changelog_entry = True
except Exception as error:
logger.error('Autoincrement failed. Standard error returned:\n\n%s\n' %
error.stderr, exc_info=error)
logger.info('Project is not respected by autoincrement.')
cl = changelog.Changelog()
cl.parse_changelog(open('debian/changelog'))
- add_changelog_entry = new_dist != cl.distributions or new_version != cl.full_version
- if add_changelog_entry:
+ if new_dist != cl.distributions or new_version != cl.full_version:
cmd = [
BIN_DCH,
'--newversion',
dch.stdin.write('\n')
ret = dch.wait()
- if add_changelog_entry:
# we need to commit here else git-buildpackage will use the existing debian/changelog
# TODO: Later we should investigate why "--ignore-new" does not work!
gitrepo.git.add('-A')
gitrepo.git.commit('-a', '-m', 'add new changelog entry')
- if ret:
- raise Exception(
- '"{command}" returned with exitcode: {code}'.format(
- command=' '.join(cmd),
- code=ret,
+ if ret:
+ raise Exception(
+ '"{command}" returned with exitcode: {code}'.format(
+ command=' '.join(cmd),
+ code=ret,
+ )
)
- )
- else:
- logger.info('Changelog updated by Jenkins using debian_build.py!')
+ else:
+ logger.info('Changelog updated by Jenkins using debian_build.py!')
# let me see the first two entries or our adjusted changelog:
- # TODO: use changelog python libs instead of DCH calls, see above
cl = changelog.Changelog()
cl.parse_changelog(open('debian/changelog'))
logger.info('New changelog:')