Support hex versionCode in build command line

Example: fdroid build net.gaast.giggity:0x200
This commit is contained in:
Jochen Sprickerhof 2019-11-28 21:44:28 +01:00
parent b83c3c9e18
commit 0e071a689d

View file

@ -497,6 +497,11 @@ def read_pkg_args(appid_versionCode_pairs, allow_vercodes=False):
for p in appid_versionCode_pairs: for p in appid_versionCode_pairs:
if allow_vercodes and ':' in p: if allow_vercodes and ':' in p:
package, vercode = p.split(':') package, vercode = p.split(':')
try:
i_vercode = int(vercode, 0)
except ValueError:
i_vercode = int(vercode)
vercode = str(i_vercode)
else: else:
package, vercode = p, None package, vercode = p, None
if package not in vercodes: if package not in vercodes: