summaryrefslogtreecommitdiff
path: root/utils/common
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2015-05-30 17:59:50 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2015-05-30 17:59:50 +0200
commit2af2a1253cc557eb7a845132e65e68e14cfd2a4a (patch)
treeeef7f1a1de3bbe5545f84d938d4bbbef7e95773f /utils/common
parent47d053735be0233a9821fdfdfd1d0a4651b6e61f (diff)
downloadrockbox-2af2a1253cc557eb7a845132e65e68e14cfd2a4a.tar.gz
rockbox-2af2a1253cc557eb7a845132e65e68e14cfd2a4a.zip
Update findversion for change version.h format.
version.h doesn't store the version number as string anymore. Update findversion to use the individual values instead. Change-Id: I6bf0fdd4420d41279b44cffd22b42febbfc778ce
Diffstat (limited to 'utils/common')
-rwxr-xr-xutils/common/deploy.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/utils/common/deploy.py b/utils/common/deploy.py
index 8f7fd72175..24163d2c98 100755
--- a/utils/common/deploy.py
+++ b/utils/common/deploy.py
@@ -127,13 +127,12 @@ def findversion(versionfile):
127 h = open(versionfile, "r") 127 h = open(versionfile, "r")
128 c = h.read() 128 c = h.read()
129 h.close() 129 h.close()
130 r = re.compile("#define +VERSION +\"(.[0-9\.a-z]+)\"") 130 version = dict()
131 m = re.search(r, c) 131 for v in ['MAJOR', 'MINOR', 'MICRO']:
132 s = re.compile("\$Revision: +([0-9]+)") 132 r = re.compile("#define +VERSION_" + v + " +([0-9a-z]+)")
133 n = re.search(s, c) 133 m = re.search(r, c)
134 if n == None: 134 version[v] = m.group(1)
135 print "WARNING: Revision not found!" 135 return "%s.%s.%s" % (version['MAJOR'], version['MINOR'], version['MICRO'])
136 return m.group(1)
137 136
138 137
139def findqt(cross=""): 138def findqt(cross=""):