Commit 2e88d10d authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

ios: Add GN flag to lock beginning of CFBundleVersion.

Adds a configurable GN flag |lock-to-version| to set the main plist
CFBundleVersion to a constant MAJOR.MINOR.BUILD value and a variable
'MAJORPATCH' in the normal PATCH tuple.

Bug: 1140474
Change-Id: I570a6502a438c60a5bd3822c60072ab5fd677ba3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485679
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818974}
parent a93675ba
......@@ -263,6 +263,9 @@ def Main(argv):
choices=('ios', 'mac'),
default='mac',
help='The target platform of the bundle')
# TODO(crbug.com/1140474): Remove once iOS 14.2 reaches mass adoption.
parser.add_option('--lock-to-version',
help='Set CFBundleVersion to given value + @MAJOR@@PATH@')
parser.add_option(
'--version-overrides',
action='append',
......@@ -326,10 +329,17 @@ def Main(argv):
'CFBundleVersion': '@BUILD@.@PATCH@',
}
else:
version_format_for_key = {
'CFBundleShortVersionString': '@MAJOR@.@BUILD@.@PATCH@',
'CFBundleVersion': '@MAJOR@.@MINOR@.@BUILD@.@PATCH@'
}
# TODO(crbug.com/1140474): Remove once iOS 14.2 reaches mass adoption.
if options.lock_to_version:
version_format_for_key = {
'CFBundleShortVersionString': '@MAJOR@.@BUILD@.@PATCH@',
'CFBundleVersion': options.lock_to_version + '.@MAJOR@@PATCH@'
}
else:
version_format_for_key = {
'CFBundleShortVersionString': '@MAJOR@.@BUILD@.@PATCH@',
'CFBundleVersion': '@MAJOR@.@MINOR@.@BUILD@.@PATCH@'
}
if options.use_breakpad:
version_format_for_key['BreakpadVersion'] = \
......
......@@ -29,6 +29,14 @@ declare_args() {
# setting |ios_enable_scene_startup| to |true|.
ios_enable_multi_window = true
# When set the main plist CFBundleVersion will be set to ios_lock_to_version,
# followed by the milestone and patch in one tuple, e.g. 86.0.4240.8720 where
# 87 is the milestone and 20 is the stable patch. Note that CFBundleVersion
# is mostly unused by Chrome and should not affect how the actual version
# number is handled internally by Chrome.
# TODO(crbug.com/1140474): Remove once iOS 14.2 reaches mass adoption.
ios_lock_to_version = ""
# Value of the encryption export compliance code. See "Cryptography and
# U.S. Export Compliance" in "Submitting the App to App Review" in the
# Apple developer documentation (https://goo.gl/yv1xEF).
......
......@@ -107,6 +107,11 @@ tweak_info_plist("info_plist") {
"--breakpad=$breakpad_enabled_as_int",
"--branding=$chromium_short_name",
]
# TODO(crbug.com/1140474): Remove once iOS 14.2 reaches mass adoption.
if (ios_lock_to_version != "") {
args += [ "--lock-to-version=$ios_lock_to_version" ]
}
}
compile_entitlements("entitlements") {
......
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