class MetaDataException(Exception):
+
def __init__(self, value):
self.value = value
('Requires Root', False),
('Repo Type', ''),
('Repo', ''),
+ ('Binaries', None),
('Maintainer Notes', []),
('Archive Policy', None),
('Auto Update Mode', 'None'),
('Current Version', ''),
('Current Version Code', '0'),
('No Source Since', ''),
- ])
+])
# In the order in which they are laid out on files
('preassemble', []),
('antcommands', None),
('novcheck', False),
- ])
+])
# Designates a metadata field type and checks that it matches
["Repo Type"],
[]),
+ FieldValidator("Binaries",
+ r'^http[s]?://', None,
+ ["Binaries"],
+ []),
+
FieldValidator("Archive Policy",
r'^[0-9]+ versions$', None,
["Archive Policy"],
r"^(Tags|Tags .+|RepoManifest|RepoManifest/.+|RepoTrunk|HTTP|Static|None)$", None,
["Update Check Mode"],
[])
- }
+}
# Check an app's metadata information for integrity errors
# Port legacy ';' separators
pv = [v.strip() for v in pv.replace(';', ',').split(',')]
if pk == 'gradle':
- if len(pv) == 1 and pv[0] in ['main', 'yes', '']:
- pv = []
+ if len(pv) == 1 and pv[0] in ['main', 'yes']:
+ pv = ['yes']
thisbuild[pk] = pv
elif t == 'string' or t == 'script':
thisbuild[pk] = pv
if app['Repo Type']:
writefield('Repo Type')
writefield('Repo')
+ if app['Binaries']:
+ writefield('Binaries')
mf.write('\n')
for build in app['builds']: