mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
New update checking mode
This commit is contained in:
parent
7be0d0be30
commit
f3d7092dbe
3 changed files with 82 additions and 22 deletions
20
import.py
20
import.py
|
|
@ -189,25 +189,7 @@ def main():
|
|||
sys.exit(1)
|
||||
|
||||
# Extract some information...
|
||||
vcsearch = re.compile(r'.*android:versionCode="([^"]+)".*').search
|
||||
vnsearch = re.compile(r'.*android:versionName="([^"]+)".*').search
|
||||
psearch = re.compile(r'.*package="([^"]+)".*').search
|
||||
version = None
|
||||
vercode = None
|
||||
package = None
|
||||
for line in file(manifest):
|
||||
if not package:
|
||||
matches = psearch(line)
|
||||
if matches:
|
||||
package = matches.group(1)
|
||||
if not version:
|
||||
matches = vnsearch(line)
|
||||
if matches:
|
||||
version = matches.group(1)
|
||||
if not vercode:
|
||||
matches = vcsearch(line)
|
||||
if matches:
|
||||
vercode = matches.group(1)
|
||||
version, vercode, package = common.parse_androidmanifest(manifest)
|
||||
if not package:
|
||||
print "Couldn't find package ID"
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue