0

Remove obsolete override "ios_extra_version_path".

Chrome on iOS is aligning with the rest of Chrome and no longer uses
"ios_extra_version_path". Remove it from version_info components and
remove the "gclient" hook that generated ios/build/util/CANARY_VERSION.

BUG=591419

Review URL: https://codereview.chromium.org/1784783002

Cr-Commit-Position: refs/heads/master@{#380394}
This commit is contained in:
sdefresne
2016-03-10 04:28:28 -08:00
committed by Commit bot
parent 9637a42fca
commit 39e8a6f4d2
6 changed files with 0 additions and 121 deletions

1
.gitignore vendored

@ -184,7 +184,6 @@ vs-chromium-project.txt
/gyp-mac-tool
/infra/.recipe_deps
/internal_gyp
/ios/build/util/CANARY_VERSION
/ios/third_party/earl_grey/src
/ios/third_party/fishhook/src
/ios/third_party/gcdwebserver/src

7
DEPS

@ -650,13 +650,6 @@ hooks = [
'-s', 'src/third_party/WebKit',
'-o', 'src/build/util/LASTCHANGE.blink'],
},
{
# Update CANARY_VERSION.
'name': 'ios_canary_version',
'pattern': '.',
'action': ['python', 'src/ios/build/util/canary_version.py',
'-o', 'src/ios/build/util/CANARY_VERSION'],
},
# Pull GN binaries. This needs to be before running GYP below.
{
'name': 'gn_win',

@ -4,12 +4,6 @@
{
'variables': {
# Some plaform want to override part of the version number generation
# (for example iOS uses a different value for PATCH level for canary).
# This can be done settings "extra_version_path" variable to the path
# of a file with the corresponding value overrides. If present it will
# be loaded after all other input files.
'extra_version_name': '',
'conditions': [
['branding == "Chrome"', {
'use_unofficial_version_number%': 0,
@ -93,35 +87,8 @@
'<(template_input_path)',
'<@(_outputs)',
],
'conditions': [
['extra_version_name!=""', {
'variables': {
'extra_version_flags': [
'-f', '<(extra_version_name)',
],
},
'inputs': [
'<(extra_version_name)'
],
}],
],
},
],
},
],
'conditions': [
['OS=="ios"', {
'variables': {
# Use nested 'variables' to workaround how variables work with gyp (no
# determined ordering and thuse it is not possible to define a variable
# in function of another).
'variables': {
# Path to the file used to override the version PATH level on iOS.
# Default to ios/build/util/VERSION.
'ios_extra_version_path%': '../ios/build/util/VERSION',
},
'extra_version_name': '<(ios_extra_version_path)'
},
}],
],
}

@ -6,12 +6,6 @@ import("//build/config/chrome_build.gni")
import("//chrome/version.gni")
declare_args() {
if (is_ios) {
# Path to the file used to override the version PATH level on iOS.
# Default to ios/build/util/VERSION.
ios_extra_version_path = "//ios/build/util/VERSION"
}
use_unofficial_version_number = !is_chrome_branded
}
@ -36,19 +30,4 @@ source_set("version_info") {
process_version("generate_version_info") {
template_file = "version_info_values.h.version"
output = "$target_gen_dir/version_info_values.h"
if (is_ios) {
# iOS overrides PATCH level of the version with the value from the file
# named by ios_version_path, however, this needs to be the last argument
# to the version.py script, so it cannot be added to the sources variable
# and instead need to be managed manually.
inputs = [
ios_extra_version_path,
]
extra_args = [
"-f",
rebase_path(ios_extra_version_path, root_build_dir),
]
}
}

@ -1 +0,0 @@
PATCH=0

@ -1,58 +0,0 @@
#!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Writes canary version information to a specified file."""
import datetime
import sys
import optparse
import os
def WriteIfChanged(file_name, content):
"""
Write |content| to |file_name| iff the content is different from the
current content.
"""
try:
old_content = open(file_name, 'rb').read()
except EnvironmentError:
pass
else:
if content == old_content:
return
os.unlink(file_name)
open(file_name, 'wb').write(content)
def main(argv=None):
if argv is None:
argv = sys.argv
parser = optparse.OptionParser(usage="canary_version.py [options]")
parser.add_option("-o", "--output", metavar="FILE",
help="write patch level to FILE")
opts, args = parser.parse_args(argv[1:])
out_file = opts.output
if args and out_file is None:
out_file = args.pop(0)
if args:
sys.stderr.write('Unexpected arguments: %r\n\n' % args)
parser.print_help()
sys.exit(2)
# Number of days since January 1st, 2012.
day_number = (datetime.date.today() - datetime.date(2012, 1, 1)).days
content = "PATCH={}\n".format(day_number)
if not out_file:
sys.stdout.write(content)
else:
WriteIfChanged(out_file, content)
if __name__ == '__main__':
sys.exit(main())