From: Benjamin Drung Date: Wed, 23 Jul 2014 23:31:43 +0000 (+0200) Subject: debian_build.py: Use correct changes filename. X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=f6838fd4e5da99d47cce6de13c11ddabf946cd81;p=profitbricks%2Fjenkins-build-scripts.git debian_build.py: Use correct changes filename. --- diff --git a/debian_build.py b/debian_build.py index a4692a0..ed2dc95 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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): diff --git a/lib/sbuild.py b/lib/sbuild.py index 521099c..60de654 100644 --- a/lib/sbuild.py +++ b/lib/sbuild.py @@ -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