# Act II: make decissions
- for line in fileinput.input('debian/control'):
- if line.lower().startswith('section: unknown'):
- raise Exception('debian/control sets "section" to unknown. This is not allowed, failing...')
- exit_error()
-
if re.match(STABLE_BRANCHES_RE,ENV['GIT_BRANCH']):
new_dist = 'production-proposed-updates'
new_version = '{version}'.format(
))
figlet('Cleanup OK')
+ # .. NOW we can verify debian/control contents
+ for line in fileinput.input('debian/control'):
+ if line.lower().startswith('section: unknown'):
+ raise Exception('debian/control sets "section" to unknown. This is not allowed, failing...')
+ exit_error()
+
# .. update changelog if we trust the package
if do_autoincrement:
subprocess.check_call([BIN_DCH, '-i', 'Released by jenkins.'])
# let me see the first two changelog entries:
- # TODO: use changelog python libs instead of DCH calls, see above
- cl = changelog.Changelog()
- cl.parse_changelog(open('debian/changelog'))
- logger.info('New changelog:\n\n%s' %(
- ''.join([block.__str__() for block in cl._blocks[0:2]])))
+ line_counter = 0
+ for line in fileinput.input('debian/changelog'):
+ if line.startswith(' --'):
+ line_counter += 1
+ if line_counter <= 2:
+ print('debian/changelog: %s' %(line.rstrip('\n')))
# ACT IV: preparations are set, let's build
except Exception as error:
figlet('Upload failed')
- logger.exception(error)
+ logger.error('Upload failed. See above for details.')
+ exit_error()
# .. define the time of completion