Chromium Code Reviews| 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 # This exposes the Chrome version as GN variables for use in build files. | 5 # This exposes the Chrome version as GN variables for use in build files. |
| 6 # | 6 # |
| 7 # PREFER NOT TO USE THESE. The GYP build uses this kind of thing extensively. | 7 # PREFER NOT TO USE THESE. The GYP build uses this kind of thing extensively. |
| 8 # However, it is far better to write an action (or use the process_version | 8 # However, it is far better to write an action (or use the process_version |
| 9 # wrapper in chrome/version.gni) to generate a file at build-time with the | 9 # wrapper in chrome/version.gni) to generate a file at build-time with the |
| 10 # information you need. This allows better dependency checking and GN will | 10 # information you need. This allows better dependency checking and GN will |
| 11 # run faster. | 11 # run faster. |
| 12 # | 12 # |
| 13 # These values should only be used if you REALLY need to depend on them at | 13 # These values should only be used if you REALLY need to depend on them at |
| 14 # build-time, for example, in the computation of output file names. | 14 # build-time, for example, in the computation of output file names. |
| 15 | 15 |
| 16 # Give version.py a pattern that will expand to a GN scope consisting of | 16 # Give version.py a pattern that will expand to a GN scope consisting of |
| 17 # all values we need at once. | 17 # all values we need at once. |
| 18 _version_dictionary_template = "full = \"@MAJOR@.@MINOR@.@BUILD@.@PATCH@\" " + | 18 _version_dictionary_template = "full = \"@MAJOR@.@MINOR@.@BUILD@.@PATCH@\" " + |
| 19 "major = \"@MAJOR@\" minor = \"@MINOR@\" " + | 19 "major = \"@MAJOR@\" minor = \"@MINOR@\" " + |
| 20 "build = \"@BUILD@\" patch = \"@PATCH@\"" | 20 "build = \"@BUILD@\" patch = \"@PATCH@\" " + |
| 21 "remoting = \"@REMOTING_PATCH\" " | |
| 21 | 22 |
| 22 # The file containing the Chrome version number. | 23 # The file containing the Chrome version number. |
| 23 chrome_version_file = "//chrome/VERSION" | 24 chrome_version_file = "//chrome/VERSION" |
| 24 | 25 |
| 26 # The file containing the Chromoting version number. | |
| 27 remoting_version_file = "//remoting/VERSION" | |
| 28 | |
| 29 # The | |
|
Sergey Ulanov
2015/11/03 18:21:37
Finish the comment or remove it.
Dirk Pranke
2015/11/03 21:10:20
Whoops. I will remove it. Good catch.
| |
| 25 _result = exec_script("version.py", | 30 _result = exec_script("version.py", |
| 26 [ | 31 [ |
| 27 "-f", | 32 "-f", |
| 28 rebase_path(chrome_version_file, root_build_dir), | 33 rebase_path(chrome_version_file, root_build_dir), |
| 29 "-t", | 34 "-t", |
| 30 _version_dictionary_template, | 35 _version_dictionary_template, |
| 31 ], | 36 ], |
| 32 "scope", | 37 "scope", |
| 33 [ chrome_version_file ]) | 38 [ chrome_version_file ]) |
| 34 | 39 |
| 35 # Full version. For example "45.0.12321.0" | 40 # Full version. For example "45.0.12321.0" |
| 36 chrome_version_full = _result.full | 41 chrome_version_full = _result.full |
| 37 | 42 |
| 38 # The consituent parts of the full version. | 43 # The consituent parts of the full version. |
| 39 chrome_version_major = _result.major | 44 chrome_version_major = _result.major |
| 40 chrome_version_minor = _result.minor | 45 chrome_version_minor = _result.minor |
| 41 chrome_version_build = _result.build | 46 chrome_version_build = _result.build |
| 42 chrome_version_patch = _result.patch | 47 chrome_version_patch = _result.patch |
| 48 remoting_version_patch = _result.remoting | |
| OLD | NEW |