mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
Support hex in versionCode
Example: https://github.com/Wilm0r/giggity/blob/master/app/src/main/AndroidManifest.xml#L2
This commit is contained in:
parent
d0449d9713
commit
b83c3c9e18
2 changed files with 16 additions and 4 deletions
|
@ -168,10 +168,18 @@ def check_tags(app, pattern):
|
||||||
if vercode:
|
if vercode:
|
||||||
logging.debug("Manifest exists in subdir '{0}'. Found version {1} ({2})"
|
logging.debug("Manifest exists in subdir '{0}'. Found version {1} ({2})"
|
||||||
.format(subdir, version, vercode))
|
.format(subdir, version, vercode))
|
||||||
if int(vercode) > int(hcode):
|
try:
|
||||||
|
i_vercode = int(vercode, 0)
|
||||||
|
except ValueError:
|
||||||
|
i_vercode = int(vercode)
|
||||||
|
try:
|
||||||
|
i_hcode = int(hcode, 0)
|
||||||
|
except ValueError:
|
||||||
|
i_hcode = int(hcode)
|
||||||
|
if i_vercode > i_hcode:
|
||||||
hpak = package
|
hpak = package
|
||||||
htag = tag
|
htag = tag
|
||||||
hcode = str(int(vercode))
|
hcode = str(i_vercode)
|
||||||
hver = version
|
hver = version
|
||||||
|
|
||||||
if not hpak:
|
if not hpak:
|
||||||
|
|
|
@ -3209,10 +3209,14 @@ def parse_xml(path):
|
||||||
|
|
||||||
def string_is_integer(string):
|
def string_is_integer(string):
|
||||||
try:
|
try:
|
||||||
int(string)
|
int(string, 0)
|
||||||
return True
|
return True
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
try:
|
||||||
|
int(string)
|
||||||
|
return True
|
||||||
|
except ValueError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def local_rsync(options, fromdir, todir):
|
def local_rsync(options, fromdir, todir):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue