Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: tools/polymer/generate_compiled_resources_gyp.py

Issue 1908273002: [tools] fix target_name ordering bug in generate_compiled_resources_gyp.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/polymer/generate_compiled_resources_gyp.py
diff --git a/tools/polymer/generate_compiled_resources_gyp.py b/tools/polymer/generate_compiled_resources_gyp.py
index 38f81578ab40b78df5e70238dfc78249a212fbee..d825b171a6f9f1c93f715bfe0e9c7739ad496fef 100755
--- a/tools/polymer/generate_compiled_resources_gyp.py
+++ b/tools/polymer/generate_compiled_resources_gyp.py
@@ -32,7 +32,11 @@ _COMPILED_RESOURCES_TEMPLATE = """
def main(created_by, html_files):
targets = ""
- for html_file in html_files:
+ def _target_name(target_file):
+ assert target_file.endswith(".html")
+ return path.basename(target_file)[:-len(".html")] + "-extracted"
+
+ for html_file in sorted(html_files, key=_target_name):
html_base = path.basename(html_file)
if html_base in _POLYMERS:
continue
@@ -52,7 +56,7 @@ def main(created_by, html_files):
dependencies.append(_WEB_ANIMATIONS_TARGET)
continue
- target = import_base[:-5] + "-extracted"
+ target = _target_name(import_base)
if not path.isfile(path.join(html_dir, import_dir, target + ".js")):
continue
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698