Support hex in versionCode

Example: https://github.com/Wilm0r/giggity/blob/master/app/src/main/AndroidManifest.xml#L2
This commit is contained in:
Jochen Sprickerhof committed 2019-11-29 20:01:29 +01:00
1 parent d0449d9713
commit b83c3c9e18
2 files changed
+16 -4

No files matched your search

+10 -2
View File
@@ -168,10 +168,18 @@ def check_tags(app, pattern):
if vercode:
logging.debug("Manifest exists in subdir '{0}'. Found version {1} ({2})"
.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
htag = tag
hcode = str(int(vercode))
hcode = str(i_vercode)
hver = version
if not hpak:
+6 -2
View File
@@ -3209,10 +3209,14 @@ def parse_xml(path):
def string_is_integer(string):
try:
int(string)
int(string, 0)
return True
except ValueError:
return False
try:
int(string)
return True
except ValueError:
return False
def local_rsync(options, fromdir, todir):