Add arg to change script for computing build timestamp
This makes it possible for other projects to closely control the build timestamp without having to modify compute_build_timestamp.py directly. Bug: 944365 Change-Id: Ia79d9deae17b5bc47d19d6491caaadc8bb62657e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1533319 Reviewed-by: Luke Halliwell <halliwell@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Eli Ribble <eliribble@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#644119} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: eecced2d8cc61596f2ffb28a06602d48bd39bed7
This commit is contained in:
Родитель
48d52cb937
Коммит
ad15c33ac9
|
@ -6,6 +6,17 @@
|
|||
|
||||
import("//build/util/lastchange.gni")
|
||||
|
||||
declare_args() {
|
||||
# This should be the filename of a script that prints a single line
|
||||
# containing an integer that's a unix timestamp in UTC.
|
||||
# This timestamp is used as build time and will be compiled into
|
||||
# other code.
|
||||
#
|
||||
# This argument may look unused. Before removing please check with the
|
||||
# chromecast team to see if they still use it internally.
|
||||
compute_build_timestamp = "compute_build_timestamp.py"
|
||||
}
|
||||
|
||||
if (is_official_build) {
|
||||
official_name = "official"
|
||||
} else {
|
||||
|
@ -17,7 +28,7 @@ if (is_official_build) {
|
|||
# changes to keep this up to date. (Bots run gn on each build, and for devs
|
||||
# the timestamp being 100% accurate doesn't matter.)
|
||||
# See compute_build_timestamp.py for tradeoffs for picking the timestamp.
|
||||
build_timestamp = exec_script("compute_build_timestamp.py",
|
||||
build_timestamp = exec_script(compute_build_timestamp,
|
||||
[ official_name ],
|
||||
"trim string",
|
||||
[ lastchange_file ])
|
||||
|
|
Загрузка…
Ссылка в новой задаче