]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
add debug msg
authorRobin Wittler <robin.wittler@profitbricks.com>
Tue, 9 Aug 2011 16:26:59 +0000 (18:26 +0200)
committerRobin Wittler <robin.wittler@profitbricks.com>
Tue, 9 Aug 2011 16:26:59 +0000 (18:26 +0200)
build.py

index 44a064e8dd0852762cafcfc4b65a4f356b49fb44..d1cd802d61208251e8aa6bfaee40e068bebccee0 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -273,16 +273,16 @@ if __name__ == '__main__':
         pb_version = fh.read().rstrip()
         fh.close()
 
+    fh = open('debian/control')
+    for line in fh:
+        if line.startswith('Source:'):
+            pkg_name = line.split(':')[-1].lstrip().rstrip()
+            fh.close()
+
     if options.distribution in ('unstable', 'experimental'):
         daily_date = datetime.datetime.now().strftime('%Y%m%d-%H%M%S')
         version = '%s-%s' %(pb_version, daily_date)
         os.unlink('debian/changelog')
-        fh = open('debian/control')
-        for line in fh:
-            if line.startswith('Source:'):
-                pkg_name = line.split(':')[-1].lstrip().rstrip()
-        fh.close()
-
         cmd = ['/usr/bin/git', 'log']
         git_log = subprocess.Popen(
                 cmd,
@@ -316,8 +316,6 @@ if __name__ == '__main__':
                 '%s' %(git_log_output)
         ]
 
-        logger.debug('This is cwd: %s' %(os.getcwd()))
-        logger.debug(os.listdir('./'))
         logger.debug('Trying to call: %s' %(cmd))
 
         dch = subprocess.Popen(
@@ -367,6 +365,7 @@ if __name__ == '__main__':
             'This is the output of git-buildpackage: \n%s'
             %(ret)
     )
+    logger.debug(os.listdir())
     #create_dput_cfg()
     #dput_package_upload()