summaryrefslogtreecommitdiff
path: root/py/makedist.py
diff options
context:
space:
mode:
authorBrent Eagles <brent@zeroc.com>2006-09-22 14:11:25 +0000
committerBrent Eagles <brent@zeroc.com>2006-09-22 14:11:25 +0000
commit49286277e68e0a5d50a5623098da996898c73855 (patch)
treef7848c3819e6b2189bad5077555c20062580386c /py/makedist.py
parentAdded simple BCC READMEs for bindist (diff)
downloadice-49286277e68e0a5d50a5623098da996898c73855.tar.bz2
ice-49286277e68e0a5d50a5623098da996898c73855.tar.xz
ice-49286277e68e0a5d50a5623098da996898c73855.zip
fix version retrieval to sync with change to config/Make.rules
Diffstat (limited to 'py/makedist.py')
-rwxr-xr-xpy/makedist.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/py/makedist.py b/py/makedist.py
index 45960601ce0..84bfc022572 100755
--- a/py/makedist.py
+++ b/py/makedist.py
@@ -238,7 +238,23 @@ os.chdir(cwd)
# Get Ice version.
#
config = open(os.path.join("icepy", "config", "Make.rules"), "r")
-version = re.search("^VERSION[ \t]+=[^\d]*([\d\.]+)", config.read(), re.M).group(1)
+versionMajor = ""
+versionMinor = ""
+versionPatch = ""
+for l in config.readlines():
+ if l.startswith("VERSION_MAJOR"):
+ n, v = l.split('=')
+ versionMajor = v.strip()
+ elif l.startswith("VERSION_MINOR"):
+ n, v = l.split('=')
+ versionMinor = v.strip()
+ elif l.startswith("VERSION_PATCH"):
+ n, v = l.split('=')
+ versionPatch = v.strip()
+
+config.close()
+
+version='%s.%s.%s' % (versionMajor, versionMinor, versionPatch)
print "Fixing version in README and INSTALL files..."
fixVersion(find("icepy", "README*"), version)