mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-10 17:30:11 +01:00
Properly match app_version or version
This commit is contained in:
parent
166432e0b1
commit
f8dfe532e6
@ -842,7 +842,7 @@ def parse_androidmanifest(app_dir):
|
|||||||
vcsearch = re.compile(r'.*android:versionCode="([0-9]+)".*').search
|
vcsearch = re.compile(r'.*android:versionCode="([0-9]+)".*').search
|
||||||
vnsearch = re.compile(r'.*android:versionName="([^@]+)".*').search
|
vnsearch = re.compile(r'.*android:versionName="([^@]+)".*').search
|
||||||
psearch = re.compile(r'.*package="([^"]+)".*').search
|
psearch = re.compile(r'.*package="([^"]+)".*').search
|
||||||
vnsearch_xml = re.compile(r'.*"[a-z_]*version">([^<]+)<.*').search
|
vnsearch_xml = re.compile(r'.*"(app_|)version">([^<]+)<.*').search
|
||||||
version = None
|
version = None
|
||||||
vercode = None
|
vercode = None
|
||||||
package = None
|
package = None
|
||||||
@ -866,13 +866,13 @@ def parse_androidmanifest(app_dir):
|
|||||||
if not version:
|
if not version:
|
||||||
matches = vnsearch_xml(line)
|
matches = vnsearch_xml(line)
|
||||||
if matches:
|
if matches:
|
||||||
version = matches.group(1)
|
version = matches.group(2)
|
||||||
if not version:
|
if not version:
|
||||||
for line in file(app_dir + '/res/values/strings.xml'):
|
for line in file(app_dir + '/res/values/strings.xml'):
|
||||||
if not version:
|
if not version:
|
||||||
matches = vnsearch_xml(line)
|
matches = vnsearch_xml(line)
|
||||||
if matches:
|
if matches:
|
||||||
version = matches.group(1)
|
version = matches.group(2)
|
||||||
if not version:
|
if not version:
|
||||||
version = "None"
|
version = "None"
|
||||||
return (version, vercode, package)
|
return (version, vercode, package)
|
||||||
|
Loading…
Reference in New Issue
Block a user