summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2014-08-27 13:07:12 -0700
committerBen Smith <binji@chromium.org>2014-08-27 20:15:19 +0000
commit7465b7135d712f057977e81516ec947939ad6337 (patch)
tree611806cad8b77898052472ae931a1e53f9a3c12b
parent22c8bddb6fa6b1c11960989a175f95d363119e6d (diff)
downloadchromium_src-7465b7135d712f057977e81516ec947939ad6337.zip
chromium_src-7465b7135d712f057977e81516ec947939ad6337.tar.gz
chromium_src-7465b7135d712f057977e81516ec947939ad6337.tar.bz2
[NaCl SDK] Update build_version.ChromeVersion to return "trunk.###"
This will make the SDK archive step upload to the correct URL for trunk builds. No tries because this does not affect the Chrome build. BUG=none R=bradnelson@google.com, bradnelson@chromium.org TEST=ran locally Review URL: https://codereview.chromium.org/510133002 Cr-Commit-Position: refs/heads/master@{#292211}
-rw-r--r--native_client_sdk/src/build_tools/build_version.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/native_client_sdk/src/build_tools/build_version.py b/native_client_sdk/src/build_tools/build_version.py
index 375c24a..ced1a25 100644
--- a/native_client_sdk/src/build_tools/build_version.py
+++ b/native_client_sdk/src/build_tools/build_version.py
@@ -29,7 +29,7 @@ def ChromeVersion():
Chrome version string or trunk + svn rev.
'''
info = FetchVersionInfo()
- if info.url.startswith('/trunk/'):
+ if info.url == 'refs/heads/master':
return 'trunk.%s' % info.revision
else:
return ChromeVersionNoTrunk()
@@ -110,14 +110,11 @@ def FetchGitCommitPosition(directory=None):
"""
proc = lastchange.RunGitCommand(directory,
['show', '-s', '--format=%B', 'HEAD'])
- pos = ''
if proc:
output = proc.communicate()[0]
if proc.returncode == 0 and output:
for line in reversed(output.splitlines()):
- match = re.search('Cr-Commit-Position: .*@{#(\d+)}', line)
+ match = re.search('Cr-Commit-Position: (.*)@{#(\d+)}', line)
if match:
- pos = match.group(1)
- if not pos:
- return lastchange.VersionInfo(None, None)
- return lastchange.VersionInfo('git', pos)
+ return lastchange.VersionInfo(match.group(1), match.group(2))
+ return lastchange.VersionInfo(None, None)