xref: /aosp_15_r20/external/cronet/build/util/BUILD.gn (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# Copyright 2013 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/util/lastchange.gni")
6
7action("chromium_git_revision") {
8  script = "version.py"
9
10  template_file = "chromium_git_revision.h.in"
11  inputs = [
12    lastchange_file,
13    template_file,
14  ]
15
16  output_file = "$target_gen_dir/chromium_git_revision.h"
17  outputs = [ output_file ]
18
19  args = [
20    # LASTCHANGE contains "<build hash>-<ref>".  The user agent only wants the
21    # "<build hash>" bit, so chop off everything after it.
22    "-e",
23    "LASTCHANGE=LASTCHANGE[:LASTCHANGE.find('-')]",
24    "-f",
25    rebase_path(lastchange_file, root_build_dir),
26    rebase_path(template_file, root_build_dir),
27    rebase_path(output_file, root_build_dir),
28  ]
29}
30
31group("test_results") {
32  data = [
33    "//.vpython3",
34    "//build/util/lib/__init__.py",
35    "//build/util/lib/results/",
36  ]
37}
38