Nico Weber | 967d1f1 | 2018-08-17 02:42:02 | [diff] [blame^] | 1 | # Copyright 2018 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. |
| 4 | # |
| 5 | # Defines the build_timestamp variable. |
| 6 | |
| 7 | import("//build/util/lastchange.gni") |
| 8 | |
| 9 | if (is_official_build) { |
| 10 | official_name = "official" |
| 11 | } else { |
| 12 | official_name = "default" |
| 13 | } |
| 14 | |
| 15 | # This will return a timestamp that's different each day (official builds) |
| 16 | # of each month (regular builds). Just rely on gn rerunning due to other |
| 17 | # changes to keep this up to date. (Bots run gn on each build, and for devs |
| 18 | # the timestamp being 100% accurate doesn't matter.) |
| 19 | # See compute_build_timestamp.py for tradeoffs for picking the timestamp. |
| 20 | build_timestamp = exec_script("compute_build_timestamp.py", |
| 21 | [ official_name ], |
| 22 | "trim string", |
| 23 | [ lastchange_file ]) |