update version script

This commit is contained in:
radius 2016-03-19 13:18:06 -05:00
parent 1c56e86da4
commit 52b6d73c5a

View File

@ -7,8 +7,12 @@ dom1 = parse("AndroidManifest.xml")
oldVersion = dom1.documentElement.getAttribute("android:versionCode")
versionNumbers = oldVersion.split('.')
versionName = dom1.documentElement.getAttribute("android:versionName")
versionName = versionName + "+"
versionNumbers[-1] = unicode(int(time.time()))
dom1.documentElement.setAttribute("android:versionCode", u'.'.join(versionNumbers))
dom1.documentElement.setAttribute("android:versionName", versionName)
with open("AndroidManifest.xml", 'wb') as f:
for line in dom1.toxml("utf-8"):