thisbuild['version'] = parts[0]
thisbuild['vercode'] = parts[1]
try:
- thisbuild['vercode'] = int(thisbuild['vercode'])
+ testvercode = int(thisbuild['vercode'])
except:
raise MetaDataException("Invalid version code for build in " + metafile.name)
thisbuild['commit'] = parts[2]
# Keeping the original formatting if we loaded it from a file...
mf.write('\\\n'.join(build['origlines']) + '\n')
else:
- mf.write(build['version'] + ',' + str(build['vercode']) + ',' +
+ mf.write(build['version'] + ',' + build['vercode'] + ',' +
build['commit'])
for key,value in build.iteritems():
if key not in ['version', 'vercode', 'commit']:
if not vercode:
matches = vcsearch(line)
if matches:
- vercode = int(matches.group(1))
+ vercode = matches.group(1)
if version:
return (version, vercode, package)
for xmlfile in glob.glob(app_dir + '/res/values/strings*transl*.xml'):
raise BuildException("Failed to amend manifest")
if 'forcevercode' in build:
if subprocess.call(['sed','-r','-i',
- 's/android:versionCode="[^"]+"/android:versionCode="' + str(build['vercode']) + '"/g',
+ 's/android:versionCode="[^"]+"/android:versionCode="' + build['vercode'] + '"/g',
'AndroidManifest.xml'], cwd=root_dir) !=0:
raise BuildException("Failed to amend manifest")
if thisbuild['vercode'] == app['Current Version Code']:
cantupdate = True
apklist.append({
- 'versioncode': thisbuild['vercode'],
+ #TODO: Nasty: vercode is a string in the build, and an int elsewhere
+ 'versioncode': int(thisbuild['vercode']),
'version': thisbuild['version'],
'buildproblem': thisbuild['commit'][1:]
})