mirror of
https://github.com/libretro/RetroArch
synced 2025-03-14 01:19:01 +00:00
add script to increment the android version code
This commit is contained in:
parent
5c77e8677f
commit
ac3ca76d83
16
pkg/android/phoenix/version_increment.py
Normal file
16
pkg/android/phoenix/version_increment.py
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python
|
||||
import time
|
||||
|
||||
|
||||
from xml.dom.minidom import parse
|
||||
dom1 = parse("AndroidManifest.xml")
|
||||
oldVersion = dom1.documentElement.getAttribute("android:versionCode")
|
||||
versionNumbers = oldVersion.split('.')
|
||||
|
||||
versionNumbers[-1] = unicode(int(time.time()))
|
||||
dom1.documentElement.setAttribute("android:versionCode", u'.'.join(versionNumbers))
|
||||
|
||||
with open("AndroidManifest.xml", 'wb') as f:
|
||||
for line in dom1.toxml("utf-8"):
|
||||
f.write(line)
|
||||
|
Loading…
x
Reference in New Issue
Block a user