11
11
'pkg{PACKAGING_REVISION}~{DISTRIBUTION}1')
13
13
jenkinsBuildNumber = ''
15
def __init__(self, ppa, trunk, packagingBranch,
16
def __init__(self, ppas, trunk, packagingBranch,
16
17
DEBFULLNAME, DEBEMAIL, revision=None,
17
18
versionFormat=None,
18
19
distributions=None, jenkinsBuildNumber=''):
38
def doDput(self, recipe, version_string, changelog_entry, distribution):
39
def doDput(self, recipe, version_string, changelog_entry, distribution,
39
41
logger.info('Going to dput version: ' + version_string)
40
42
#export DEBFULLNAME=
41
43
os.putenv('DEBFULLNAME', self.DEBFULLNAME)
55
57
logger.debug('Calling: %r', debuild_call)
56
58
subprocess.check_call(debuild_call, cwd=recipe.getTrunkDir())
57
59
#dput $ppa *${version_string}_source.changes
58
dput_call = ['dput', self.ppa, name + '_source.changes']
60
dput_call = ['dput', ppa, name + '_source.changes']
59
61
logger.debug('Calling: %r', dput_call)
60
62
subprocess.check_call(dput_call, cwd=recipe.getBuildDir())
63
#rm -f _source.ppa.upload
64
rm_call = ['rm', '-f', name + '_source.ppa.upload']
65
logger.debug('Calling: %r', rm_call)
66
subprocess.check_call(rm_call, cwd=recipe.getBuildDir())
61
67
#revert the previous dch calls to get a clean changelog
62
68
logger.debug('Reverting the change made by dch call')
70
76
recipe = BzrRecipe(self.trunk, self.packagingBranch, self.revision)
72
78
for distribution in self.distributions:
73
formatedVersionString = self.formatVersionString(
80
formatedVersionString = self.formatVersionString(
74
81
PACKAGE_VERSION=recipe.getPackageVersion(),
75
82
BZR_REVISION=recipe.getTrunkRevno(),
76
83
PACKAGING_REVISION=recipe.getPackagingBranchRevno(),
77
84
JENKINS_BUILD_NUMBER=self.jenkinsBuildNumber,
78
85
DISTRIBUTION=distribution)
79
if not formatedVersionString:
80
logger.error('Aborting dput as no format string was specified')
83
self.doDput(recipe, formatedVersionString,
84
"Automatic build of revision " +
85
str(recipe.getTrunkRevno()),
87
except subprocess.CalledProcessError as e:
88
logger.error('Command %s returned non-zero exit status %d',
86
if not formatedVersionString:
88
'Aborting dput as no format string was specified')
91
self.doDput(recipe, formatedVersionString,
92
"Automatic build of revision " +
93
str(recipe.getTrunkRevno()),
96
except subprocess.CalledProcessError as e:
97
logger.error('Command %s returned non-zero exit status %d',