# we need to commit here else git-buildpackage will use the existing debian/changelog...
# TODO: Later we should investigate why the "--ignore-new" trick
# did not work!
- #cmd = ['/usr/bin/git', 'add', '-A']
- #subprocess.check_call(cmd)
- #cmd = ['/usr/bin/git', 'commit', '-a', '-m', 'add new changelog entry']
- #subprocess.check_call(cmd)
+ cmd = ['/usr/bin/git', 'add', '-A']
+ subprocess.check_call(cmd)
+ cmd = ['/usr/bin/git', 'commit', '-a', '-m', 'add new changelog entry']
+ subprocess.check_call(cmd)
if options.distribution in ('experimental'):
pb_suite='experimental'
logger.info('used to start git-buildpackage here...')
ret = gbp.build()
+ # remove last commit (the one where we added the changelog entry)
+ cmd = ['/usr/bin/git', 'reset', '--soft', 'HEAD~1']
+ subprocess.check_call(cmd)
+ # now handle gpb result
if ret:
logger_loud_error(
'git-buildpackage returned non-zero. exitcode was: %s' % ret