Commit 07d9b3a5 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

ios: Format PATCH to 3 digits when locking CFBundleVersion.

Bug: 1140474
Change-Id: I53d57e95867a29bd682bbc1e726d2327ab047195
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2491544Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819874}
parent 7f3e8531
......@@ -331,9 +331,17 @@ def Main(argv):
else:
# TODO(crbug.com/1140474): Remove once iOS 14.2 reaches mass adoption.
if options.lock_to_version:
# Pull in the PATCH number and format it to 3 digits.
VERSION_TOOL = os.path.join(TOP, 'build/util/version.py')
VERSION_FILE = os.path.join(TOP, 'chrome/VERSION')
(stdout,
retval) = _GetOutput([VERSION_TOOL, '-f', VERSION_FILE, '-t', '@PATCH@'])
if retval != 0:
return 2
patch = '{:03d}'.format(int(stdout))
version_format_for_key = {
'CFBundleShortVersionString': '@MAJOR@.@BUILD@.@PATCH@',
'CFBundleVersion': options.lock_to_version + '.@MAJOR@@PATCH@'
'CFBundleVersion': options.lock_to_version + '.@MAJOR@' + patch
}
else:
version_format_for_key = {
......
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