Commit f865c593 authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

WebUI: Ensure that unpack_pak GN rule produces correct timestamps.

Bug: 762346
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I5ea349b1e1c99ad0c1a2b9e0f63b5049b9c4f30f
Reviewed-on: https://chromium-review.googlesource.com/683458
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504295}
parent d523c911
...@@ -110,7 +110,7 @@ template("unpak") { ...@@ -110,7 +110,7 @@ template("unpak") {
] ]
outputs = [ outputs = [
"$target_gen_dir/${invoker.out_folder}", "$target_gen_dir/${invoker.out_folder}/unpack.stamp",
] ]
deps = invoker.deps deps = invoker.deps
......
...@@ -11,6 +11,10 @@ import sys ...@@ -11,6 +11,10 @@ import sys
_HERE_PATH = os.path.join(os.path.dirname(__file__)) _HERE_PATH = os.path.join(os.path.dirname(__file__))
# The name of a dummy file to be updated always after all other files have been
# written. This file is declared as the "output" for GN's purposes
_TIMESTAMP_FILENAME = os.path.join('unpack.stamp')
_SRC_PATH = os.path.normpath(os.path.join(_HERE_PATH, '..', '..', '..')) _SRC_PATH = os.path.normpath(os.path.join(_HERE_PATH, '..', '..', '..'))
sys.path.insert(1, os.path.join(_SRC_PATH, 'tools', 'grit')) sys.path.insert(1, os.path.join(_SRC_PATH, 'tools', 'grit'))
...@@ -62,6 +66,10 @@ def main(): ...@@ -62,6 +66,10 @@ def main():
unpack(args.pak_file, args.out_folder) unpack(args.pak_file, args.out_folder)
timestamp_file_path = os.path.join(args.out_folder, _TIMESTAMP_FILENAME)
with open(timestamp_file_path, 'a'):
os.utime(timestamp_file_path, None)
if __name__ == '__main__': if __name__ == '__main__':
main() main()
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