]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build.py: Use correct changes filename.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Wed, 23 Jul 2014 23:31:43 +0000 (01:31 +0200)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Wed, 23 Jul 2014 23:31:43 +0000 (01:31 +0200)
debian_build.py
lib/sbuild.py

index a4692a06bff643fb938cd1b9c03e6a69a7a92f02..ed2dc9537af3154000139ac733d2abd91df9b171 100755 (executable)
@@ -728,22 +728,7 @@ export {builder_env} FORCE_SHELL=TRUE
                 dpkg_build_version = dpkg_build_version.split(":", 1)[1]
 
             # construct path for changes file
-            changes_file = os.path.join(
-                ENV['WORKSPACE'],
-                '../build-area/result/',
-                '{name}_{version}_amd64.changes'.format(
-                    name=curr_name,
-                    version=dpkg_build_version,
-                )
-            )
-
-            # display changes file
-            fh = open(changes_file, 'r')
-            logger.info('Content of {file}\n{content}'.format(
-                file=changes_file,
-                content=fh.read(),
-            ))
-            fh.close()
+            changes_file = builder.changes_file
 
             # upload to Debian archive
             if not upload_to_apt_repository(apt_target, changes_file, logger):
index 521099cb7da3be43c96deceae6bf6e00e83dad8f..60de654ca973b2122ea5cbe21182aec441bbbaf7 100644 (file)
@@ -44,6 +44,11 @@ class Sbuild(object):
         ]
         return result
 
+    @property
+    def changes_file(self):
+        changes_filename = os.path.splitext(self.dsc_file)[0] + '_' + self.arch + '.changes'
+        return os.path.join(self.dsc_dir, changes_filename)
+
     def build(self):
         '''
         TODO