)
exit_error()
- # FIXME: aka make it work now
changelog = parse_changelog.stdout
- changelog2 = changelog
- cmd = ['grep-dctrl', '-n', '-s', 'Distribution', '']
+ cmd = ['grep-dctrl', '-n', '-s', 'Version,Distribution', '']
grep_dctrl = subprocess.Popen(
cmd,
shell=False,
)
exit_error()
+ version = grep_dctrl.stdout.readline()
+ version = version.strip()
+ logger.info('Packet version is %s' % (version))
+
distribution = grep_dctrl.stdout.readline()
- distribution = distribution.strip()
- logger.info('Packet distribution is %s' % (distribution))
+ distribution = distribution.strip()
+ logger.info('Packet distribution is %s' % (distribution))
if (options.distribution in ('testing', 'staging') and not distribution in ('testing', 'staging')) or (options.distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates') and distribution in ('stable', 'stable-proposed-updates', 'production', 'production-proposed-updates')):
raise Exception(
'Distribution %s in debian/changelog did not match branch %s' % (distribution, GIT_UPSTREAM_BRANCH)
)
- exit_error()
-
- # FIXME this is code duplication, we should only rungrep-dctrl once here... (see above)
- cmd = ['grep-dctrl', '-n', '-s', 'Version', '']
- grep_dctrl = subprocess.Popen(
- cmd,
- shell=False,
- close_fds=True,
- stdin=changelog2,
- stdout=subprocess.PIPE,
- stderr=sys.stderr,
- cwd=os.getcwd()
- )
- ret = grep_dctrl.wait()
- if ret:
- raise Exception(
- '%s was not successfull, return code was %s ' % (' '.join(cmd), ret)
- )
- exit_error()
-
- version = grep_dctrl.stdout.readline()
- version = version.strip()
- logger.info('Packet version is %s' % (version))
+ exit_error()
if not GIT_COMMITTER_EMAIL:
for commit in repo.commits():