summaryrefslogtreecommitdiff
path: root/utils/common/deploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/common/deploy.py')
-rwxr-xr-xutils/common/deploy.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/common/deploy.py b/utils/common/deploy.py
index 44635c851d..1e48f8a56f 100755
--- a/utils/common/deploy.py
+++ b/utils/common/deploy.py
@@ -563,6 +563,22 @@ def deploy():
563 tempclean(workfolder, cleanup and not keeptemp) 563 tempclean(workfolder, cleanup and not keeptemp)
564 sys.exit(1) 564 sys.exit(1)
565 565
566 # replace version strings. Only done when building from trunk
567 if tag == "":
568 print "Updating version information in sources"
569 for f in regreplace:
570 infile = open(sourcefolder + "/" + f, "r")
571 incontents = infile.readlines()
572 infile.close()
573
574 outfile = open(sourcefolder + "/" + f, "w")
575 for line in incontents:
576 # replacements made on the replacement string:
577 # %REVISION% is replaced with the revision number
578 replacement = re.sub("%REVISION%", str(trunk), regreplace[f][1])
579 outfile.write(re.sub(regreplace[f][0], replacement, line))
580 outfile.close()
581
566 if source == True: 582 if source == True:
567 tf = tarfile.open(archivename, mode='w:bz2') 583 tf = tarfile.open(archivename, mode='w:bz2')
568 tf.add(sourcefolder, os.path.basename(re.subn('/$', '', sourcefolder)[0])) 584 tf.add(sourcefolder, os.path.basename(re.subn('/$', '', sourcefolder)[0]))