Commit dbe92472 authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Fix version string in release branch

The previous change (r581945) to update version string used by
ChromeDriver in release branches didn't work, because the top-most
commit doesn't have the necessary branch info. This CL adds the same
commit filter used to generate the version string shown by Chrome.

Bug: chromedriver:2080
Change-Id: I4d7b57a139968d3e5e0f1ebad26d6ed648ab5d72
Reviewed-on: https://chromium-review.googlesource.com/1171843Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582404}
parent b3392d98
...@@ -84,11 +84,12 @@ def main(): ...@@ -84,11 +84,12 @@ def main():
chromedriver_version = open( chromedriver_version = open(
options.chromedriver_version_file, 'r').read().strip() options.chromedriver_version_file, 'r').read().strip()
# Get a VersionInfo object corresponding to the Git commit we are at. # Get a VersionInfo object corresponding to the Git commit we are at,
# using the same filter used by main function of build/util/lastchange.py.
# On success, version_info.revision_id is a 40-digit Git hash, # On success, version_info.revision_id is a 40-digit Git hash,
# and version_info.revision is a longer string with more information. # and version_info.revision is a longer string with more information.
# On failure, version_info is None. # On failure, version_info is None.
version_info = lastchange.FetchGitRevision(None, None) version_info = lastchange.FetchGitRevision(None, '^Change-Id:')
if version_info: if version_info:
version = get_release_version(options.chrome_version_file, version_info) version = get_release_version(options.chrome_version_file, version_info)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment