mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Merge branch 'master' of https://gitlab.com/fdroid/fdroidserver
This commit is contained in:
commit
0f4d26c2ed
@ -991,7 +991,7 @@ def parse_androidmanifests(paths, ignoreversions=None):
|
||||
|
||||
vcsearch_g = re.compile(r'.*versionCode *=* *["\']*([0-9]+)["\']*').search
|
||||
vnsearch_g = re.compile(r'.*versionName *=* *(["\'])((?:(?=(\\?))\3.)*?)\1.*').search
|
||||
psearch_g = re.compile(r'.*packageName *=* *["\']([^"]+)["\'].*').search
|
||||
psearch_g = re.compile(r'.*(packageName|applicationId) *=* *["\']([^"]+)["\'].*').search
|
||||
|
||||
ignoresearch = re.compile(ignoreversions).search if ignoreversions else None
|
||||
|
||||
@ -1008,15 +1008,16 @@ def parse_androidmanifests(paths, ignoreversions=None):
|
||||
gradle = has_extension(path, 'gradle')
|
||||
version = None
|
||||
vercode = None
|
||||
# Remember package name, may be defined separately from version+vercode
|
||||
package = max_package
|
||||
package = None
|
||||
|
||||
if gradle:
|
||||
for line in file(path):
|
||||
# Grab first occurence of each to avoid running into
|
||||
# alternative flavours and builds.
|
||||
if not package:
|
||||
matches = psearch_g(line)
|
||||
if matches:
|
||||
package = matches.group(1)
|
||||
package = matches.group(2)
|
||||
if not version:
|
||||
matches = vnsearch_g(line)
|
||||
if matches:
|
||||
@ -1038,6 +1039,10 @@ def parse_androidmanifests(paths, ignoreversions=None):
|
||||
if string_is_integer(a):
|
||||
vercode = a
|
||||
|
||||
# Remember package name, may be defined separately from version+vercode
|
||||
if package is None:
|
||||
package = max_package
|
||||
|
||||
logging.debug("..got package={0}, version={1}, vercode={2}"
|
||||
.format(package, version, vercode))
|
||||
|
||||
|
@ -205,6 +205,22 @@ def main():
|
||||
if app['Web Site'].lower() == app['Source Code'].lower():
|
||||
warn("Website '%s' is just the app's source code link" % app['Web Site'])
|
||||
|
||||
# Old links
|
||||
usual_sites = [
|
||||
'github.com',
|
||||
'gitlab.com',
|
||||
'bitbucket.org',
|
||||
]
|
||||
old_sites = [
|
||||
'gitorious.org',
|
||||
'code.google.com',
|
||||
# 'sourceforge.net', # too many false positives as of now
|
||||
]
|
||||
if any(s in app['Repo'] for s in usual_sites):
|
||||
for f in ['Web Site', 'Source Code', 'Issue Tracker', 'Changelog']:
|
||||
if any(s in app[f] for s in old_sites):
|
||||
warn("App is in '%s' but has a link to '%s'" % (app['Repo'], app[f]))
|
||||
|
||||
if filling_ucms.match(app['Update Check Mode']):
|
||||
if all(app[f] == metadata.app_defaults[f] for f in [
|
||||
'Auto Name',
|
||||
|
Loading…
Reference in New Issue
Block a user