From: Holger Levsen Date: Wed, 8 Feb 2012 17:52:05 +0000 (+0100) Subject: lets try to get rid of the double clone X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=b9a72974659d46166e6f4df6dafc86364349ab74;p=profitbricks%2Fjenkins-build-scripts.git lets try to get rid of the double clone --- 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