From b9a72974659d46166e6f4df6dafc86364349ab74 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 8 Feb 2012 18:52:05 +0100 Subject: [PATCH] lets try to get rid of the double clone --- debian_build.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/debian_build.py b/debian_build.py index 6f89f78..f750549 100755 --- a/debian_build.py +++ b/debian_build.py @@ -415,10 +415,10 @@ if __name__ == '__main__': # 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' @@ -437,6 +437,10 @@ if __name__ == '__main__': 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 -- 2.39.5