]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
dont build if no changes
authorHolger Levsen <holger@layer-acht.org>
Sat, 17 Sep 2011 17:48:25 +0000 (19:48 +0200)
committerHolger Levsen <holger@layer-acht.org>
Sat, 17 Sep 2011 17:48:25 +0000 (19:48 +0200)
debian_build.py

index 7a5d6c03a4de8d79c547858ea025d3ff561699ec..a3dd0895ef462ee65a31dcb506cb166eff8851dc 100755 (executable)
@@ -371,6 +371,10 @@ if __name__ == '__main__':
             )
         logger.info('debian/changelog written')
 
+        if git_log.stdout == '': 
+            logger.info('git log since yesterday is empty, aborting build.')
+            sys.exit(0)
+
         # 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!