# Only process tags where the manifest exists...
paths = common.manifest_paths(build_dir, flavour)
- version, vercode, package = common.parse_androidmanifests(paths)
+ version, vercode, package = common.parse_androidmanifests(paths,
+ app['Update Check Ignore'])
if not package or package != appid or not version or not vercode:
continue
paths = common.manifest_paths(build_dir, flavour)
- version, vercode, package = common.parse_androidmanifests(paths)
+ version, vercode, package = common.parse_androidmanifests(paths,
+ app['Update Check Ignore'])
if not package:
return (None, "Couldn't find package ID")
if package != appid:
if not version:
return (None, "Couldn't find latest version name")
if not vercode:
+ if "Ignore" == version:
+ return (None, "Latest version is ignored")
return (None, "Couldn't find latest version code")
vercode = str(int(vercode))
# Extract some information from the AndroidManifest.xml at the given path.
# Returns (version, vercode, package), any or all of which might be None.
# All values returned are strings.
-def parse_androidmanifests(paths):
+def parse_androidmanifests(paths, ignoreversions=None):
if not paths:
return (None, None, None)
vnsearch_g = re.compile(r'.*versionName *=* *(["\'])((?:(?=(\\?))\3.)*?)\1.*').search
psearch_g = re.compile(r'.*packageName *=* *["\']([^"]+)["\'].*').search
+ ignoresearch = re.compile(ignoreversions).search if ignoreversions else None
+
max_version = None
max_vercode = None
max_package = None
max_package = package
if max_vercode is None or (vercode is not None and vercode > max_vercode):
- max_version = version
- max_vercode = vercode
- max_package = package
+ if not ignoresearch or not ignoresearch(version):
+ max_version = version
+ max_vercode = vercode
+ max_package = package
+ else:
+ max_version = "Ignore"
if max_version is None:
max_version = "Unknown"
'AntiFeatures': None,
'Archive Policy': None,
'Update Check Mode': 'None',
+ 'Update Check Ignore': None,
'Update Check Name': None,
'Update Check Data': None,
'Vercode Operation': None,
writefield('Archive Policy')
writefield('Auto Update Mode')
writefield('Update Check Mode')
+ if app['Update Check Ignore']:
+ writefield('Update Check Ignore')
if app['Vercode Operation']:
writefield('Vercode Operation')
if app['Update Check Data']: