Skip to content
Snippets Groups Projects
Commit fd57a56d authored by Roland McGrath's avatar Roland McGrath Committed by CQ bot account: commit-bot@chromium.org
Browse files

[build] Generate last-update in GN from jiri history, not from jiri hook

The time stamp of the last `jiri update` is visible in the
`//.jiri_root/update/update_history/` directory.  So rather than
touching the source tree in a hook that runs at the end of `jiri
update`, just generate the timestamp file in the GN build as a
function of the files `jiri update` writes.

Bug: BLD-200 #comment Stop writing //garnet/last-update file in jiri hook
Test: CQ
Change-Id: I41c1448b0fed8d0cb3985ee032d1b7d4c6209a36
parent 9bde751a
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,6 @@ tags
target
go/pkg
*.orig
last-update
/.cipd
tools/cipd.gni
.idea/
......
......@@ -4,16 +4,28 @@
import("//build/package.gni")
jiri_snapshot_file = "//.jiri_root/update_history/latest"
last_update_file = "$target_gen_dir/last-update.txt"
package("build_info") {
deprecated_system_image = true
deps = [ ":last-update.txt" ]
resources = [
{
dest = "build/last-update"
path = rebase_path("last-update")
path = last_update_file
},
{
dest = "build/snapshot"
path = rebase_path("//.jiri_root/update_history/latest")
path = jiri_snapshot_file
},
]
}
action("last-update.txt") {
visibility = [ ":*" ]
sources = [ jiri_snapshot_file ]
outputs = [ last_update_file ]
script = "tools/gen-last-update"
args = rebase_path(sources + outputs, root_build_dir)
}
......@@ -7,9 +7,6 @@
gerrithost="https://fuchsia-review.googlesource.com"/>
</projects>
<hooks>
<hook name="build-update"
project="garnet"
action="tools/update.sh"/>
<hook name="cipd-update"
project="garnet"
action="tools/cipd-update.sh"/>
......
#!/bin/bash
# Copyright 2017 The Fuchsia Authors. All rights reserved.
#!/bin/sh
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
date +%FT%T%z > last-update
exec readlink "$1" > "$2"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment