From 06662985cb678b17efbd3dfd7aa77da3e25af16b Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Tue, 6 Mar 2012 22:06:40 +0100 Subject: Correctly insert build ID. Change-Id: I35a85ffd78bd0a56a31d6ba0abbd6102727155d4 --- utils/common/deploy-rbutil.py | 2 +- utils/common/deploy.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/utils/common/deploy-rbutil.py b/utils/common/deploy-rbutil.py index 389438e920..0a68dbe805 100755 --- a/utils/common/deploy-rbutil.py +++ b/utils/common/deploy-rbutil.py @@ -57,7 +57,7 @@ deploy.progexe = { } deploy.regreplace = { "rbutil/rbutilqt/version.h" : [["\$Rev\$", "%REVISION%"], - ["(^#define BUILDID).*", "\\1 \"-%BUILDID%\""]], + ["(^#define BUILDID).*", "\\1 \"%BUILDID%\""]], "rbutil/rbutilqt/Info.plist" : [["\$Rev\$", "%REVISION%"]], } # OS X 10.6 defaults to gcc 4.2. Building universal binaries that are diff --git a/utils/common/deploy.py b/utils/common/deploy.py index 070cea65b5..8f7fd72175 100755 --- a/utils/common/deploy.py +++ b/utils/common/deploy.py @@ -569,10 +569,13 @@ def deploy(): # replacements made on the replacement string: # %REVISION% is replaced with the revision number replacement = re.sub("%REVISION%", str(revision), r[1]) - # %BUILD% is replace with buildid as passed on the command line + newline = re.sub(r[0], replacement, newline) + # %BUILD% is replaced with buildid as passed on the command line if buildid != None: - replacement = re.sub("%BUILDID%", str(buildid), replacement) - newline = re.sub(r[0], replacement, newline) + replacement = re.sub("%BUILDID%", "-" + str(buildid), replacement) + else: + replacement = re.sub("%BUILDID%", "", replacement) + newline = re.sub(r[0], replacement, newline) outfile.write(newline) outfile.close() -- cgit v1.2.3