Commit eecced2d authored by Eli Ribble's avatar Eli Ribble Committed by Commit Bot

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/+/1533319Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Eli Ribble <eliribble@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644119}
parent 034aad0a
...@@ -6,6 +6,17 @@ ...@@ -6,6 +6,17 @@
import("//build/util/lastchange.gni") 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) { if (is_official_build) {
official_name = "official" official_name = "official"
} else { } else {
...@@ -17,7 +28,7 @@ if (is_official_build) { ...@@ -17,7 +28,7 @@ if (is_official_build) {
# changes to keep this up to date. (Bots run gn on each build, and for devs # changes to keep this up to date. (Bots run gn on each build, and for devs
# the timestamp being 100% accurate doesn't matter.) # the timestamp being 100% accurate doesn't matter.)
# See compute_build_timestamp.py for tradeoffs for picking the timestamp. # 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 ], [ official_name ],
"trim string", "trim string",
[ lastchange_file ]) [ lastchange_file ])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment