Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / remoting / remoting_version.gni
blob2ff0b107afd2f084f42da1b2b23be8a1fe30afc0
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # TODO(brettw) Forking out to Python 4 times in serial just to get version
6 # numbers is highly undesirable. Instead, there should be a build step to
7 # generate an appropriate header so that the version can be generated at
8 # build-time, and not at GN-time.
10 # The |major|, |build| and |patch| versions are inherited from Chrome.
11 # Since Chrome's |minor| version is always '0', we replace it with a
12 # Chromoting-specific patch version.
13 # Note that we check both the |chrome_version_path| file and the
14 # |remoting_version_path| so that we can override the Chrome version
15 # numbers if needed.
16 _version_py_abspath = "//build/util/version.py"
17 _remoting_version_abspath = "//remoting/VERSION"
18 _chrome_version_abspath = "//chrome/VERSION"
20 # Set these files as being input dependencies to the scripts, so the build will
21 # be re-run if the files change.
22 _script_deps = [ _remoting_version_abspath, _chrome_version_abspath ]
24 _chrome_version_path = rebase_path(_chrome_version_abspath, root_build_dir)
25 _remoting_version_path = rebase_path(_remoting_version_abspath, root_build_dir)
27 version_major = exec_script(
28     _version_py_abspath,
29     [ "-f", _chrome_version_path,
30       "-f", _remoting_version_path,
31       "-t \"@MAJOR@\"" ],
32     "value",
33     _script_deps)
35 version_minor = exec_script(
36     _version_py_abspath,
37     [ "-f", _remoting_version_path,
38       "-t \"@REMOTING_PATCH@\"" ],
39     "value",
40     _script_deps)
42 version_short = "${version_major}.${version_minor}." + exec_script(
43     _version_py_abspath,
44     [ "-f", _chrome_version_path,
45       "-f", _remoting_version_path,
46       "-t \"@BUILD@\"" ],
47     "value",
48     _script_deps)
50 version_full = "${version_short}." + exec_script(
51     _version_py_abspath,
52     [ "-f", _chrome_version_path,
53       "-f", _remoting_version_path,
54       "-t \"@PATCH@\"" ],
55     "value",
56     _script_deps)