OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 # Some plaform want to override part of the version number generation | |
8 # (for example iOS uses a different value for PATCH level for canary). | |
9 # This can be done settings "extra_version_path" variable to the path | |
10 # of a file with the corresponding value overrides. If present it will | |
11 # be loaded after all other input files. | |
12 'extra_version_name': '', | |
13 'conditions': [ | 7 'conditions': [ |
14 ['branding == "Chrome"', { | 8 ['branding == "Chrome"', { |
15 'use_unofficial_version_number%': 0, | 9 'use_unofficial_version_number%': 0, |
16 }, { | 10 }, { |
17 'use_unofficial_version_number%': 1, | 11 'use_unofficial_version_number%': 1, |
18 }], | 12 }], |
19 ], | 13 ], |
20 }, | 14 }, |
21 'targets': [ | 15 'targets': [ |
22 { | 16 { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 'action': [ | 80 'action': [ |
87 'python', | 81 'python', |
88 '<(version_py_path)', | 82 '<(version_py_path)', |
89 '-f', '<(version_path)', | 83 '-f', '<(version_path)', |
90 '-f', '<(branding_path)', | 84 '-f', '<(branding_path)', |
91 '-f', '<(lastchange_path)', | 85 '-f', '<(lastchange_path)', |
92 '<@(extra_version_flags)', | 86 '<@(extra_version_flags)', |
93 '<(template_input_path)', | 87 '<(template_input_path)', |
94 '<@(_outputs)', | 88 '<@(_outputs)', |
95 ], | 89 ], |
96 'conditions': [ | |
97 ['extra_version_name!=""', { | |
98 'variables': { | |
99 'extra_version_flags': [ | |
100 '-f', '<(extra_version_name)', | |
101 ], | |
102 }, | |
103 'inputs': [ | |
104 '<(extra_version_name)' | |
105 ], | |
106 }], | |
107 ], | |
108 }, | 90 }, |
109 ], | 91 ], |
110 }, | 92 }, |
111 ], | 93 ], |
112 'conditions': [ | |
113 ['OS=="ios"', { | |
114 'variables': { | |
115 # Use nested 'variables' to workaround how variables work with gyp (no | |
116 # determined ordering and thuse it is not possible to define a variable | |
117 # in function of another). | |
118 'variables': { | |
119 # Path to the file used to override the version PATH level on iOS. | |
120 # Default to ios/build/util/VERSION. | |
121 'ios_extra_version_path%': '../ios/build/util/VERSION', | |
122 }, | |
123 'extra_version_name': '<(ios_extra_version_path)' | |
124 }, | |
125 }], | |
126 ], | |
127 } | 94 } |
OLD | NEW |