Commit 2308e07b authored by André Anjos's avatar André Anjos 💬

[ci] Move read_packages() from to ci

parent b2b82ff4
......@@ -72,3 +72,24 @@ def is_stable(package, refname, tag, repodir):'No tag information available at build')'Considering this to be a pre-release build')
return False
def read_packages(filename):
Return a python list of tuples (repository, branch), given a file containing
one package (and branch) per line. Comments are excluded
# loads dirnames from order file (accepts # comments and empty lines)
packages = []
with open(filename, 'rt') as f:
for line in f:
line = line.partition('#')[0].strip()
if line:
if ',' in line: #user specified a branch
path, branch = [k.strip() for k in line.split(',', 1)]
packages.append((path, branch))
packages.append((line, 'master'))
return packages
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment