github/update_ansible.py: raise more exceptions

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-06-15 11:32:26 +02:00
parent f93da02346
commit e2acd95f62
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 4 additions and 4 deletions

View File

@ -20,22 +20,22 @@ for line in lines:
matches = re.match(' src: (.*)', next(lines))
if not matches:
continue
raise Exception('Unable to find source URL: %s' % name)
src = matches.group(1)
matches = re.match('^git@github.com:[^/]+/(.+).git$', src)
if not matches:
raise Exception('Unable to find full repo name!')
raise Exception('Unable to find full repo name: %s' % name)
full_name = matches.group(1)
matches = re.match(' version: (.*)', next(lines))
if not matches:
continue
raise Exception('Unable to find current version: %s' % name)
version = matches.group(1)
matches = re.match(' scm: (.*)', next(lines))
if not matches:
continue
raise Exception('Unable to find version control type: %s' % name)
scm = matches.group(1)
entries.append({