Commit ea3f82d0 authored by Dirk Pranke's avatar Dirk Pranke Committed by Commit Bot

Always write //build/util/LASTCHANGE.committime.

When we added LASTCHANGE.committime in r583420, we missed a
case where we might not write it in the hook, and in that
situation the build would fail due to the file being missing.

TBR=thakis@chromium.org
BUG=875039

Change-Id: I5c596f55fe90bc5f5175c74ba27e218f108f843b
Reviewed-on: https://chromium-review.googlesource.com/1178892Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583852}
parent 76cbefb8
......@@ -214,8 +214,10 @@ def main(argv=None):
sys.stdout.write(contents)
else:
if out_file:
if WriteIfChanged(out_file, contents):
with open(out_file + '.committime', 'w') as timefile:
committime_file = out_file + '.committime'
out_changed = WriteIfChanged(out_file, contents)
if out_changed or not os.path.exists(committime_file):
with open(committime_file, 'w') as timefile:
timefile.write(str(version_info.timestamp))
if header:
WriteIfChanged(header,
......
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