Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: build/util/version.gni

Issue 2308313003: gn: Generalize process_version() and move it to build/util (Closed)
Patch Set: Move branding_file_path to chrome/process_version_rc_template.gni Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/util/process_version.gni ('k') | chrome/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 build/util/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@\" " +
(...skipping 30 matching lines...) Expand all
50 "@BUILD@.@PATCH_HI@.@PATCH_LO@", 50 "@BUILD@.@PATCH_HI@.@PATCH_LO@",
51 "-e", 51 "-e",
52 "PATCH_HI=int(PATCH)/256", 52 "PATCH_HI=int(PATCH)/256",
53 "-e", 53 "-e",
54 "PATCH_LO=int(PATCH)%256", 54 "PATCH_LO=int(PATCH)%256",
55 ], 55 ],
56 "trim string", 56 "trim string",
57 [ chrome_version_file ]) 57 [ chrome_version_file ])
58 chrome_dylib_version = _result 58 chrome_dylib_version = _result
59 } 59 }
OLDNEW
« no previous file with comments | « build/util/process_version.gni ('k') | chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698