diff options
author | David Ostrovsky <david@ostrovsky.org> | 2018-09-25 07:43:26 +0200 |
---|---|---|
committer | David Ostrovsky <david@ostrovsky.org> | 2018-09-25 08:37:23 +0200 |
commit | 9e7e9a129517fddfa81d063d327b4b98dd3a8192 (patch) | |
tree | 1357dbfec326ad2b58384dbaece3e0a975e98ff6 | |
parent | 0ee00a88ef1c1332af7a9bd4007a7d1af63e845a (diff) |
Bazel: Specify name for downloaded file to http_file starlark rule
In I44ca2ecfea6 native http_file was replaced with Starlark rule. During
this migration the original file name was lost and hard coded to file
named "downloaded". The closure_js_library expects files with .js suffix
as source files, so that we had to add an intermediate rename step to
make it work gain.
In context of this feature request: [1] downloaded_file_path was added
to the http_file rule: [2] so that we can use it now and can remove the
intermediate renaming step.
The aformentioned fix was included in 0.17.1 and we already have that
version as the minimum required Bazel version, so that we can clean that
up now.
[1] https://github.com/bazelbuild/bazel/issues/5633
[2] https://github.com/bazelbuild/bazel/pull/5647
Change-Id: Ia00e5d7b4eb9c18be808b290ac299e658ab33b9a
-rw-r--r-- | WORKSPACE | 1 | ||||
-rw-r--r-- | lib/polymer_externs/BUILD | 9 |
2 files changed, 2 insertions, 8 deletions
@@ -24,6 +24,7 @@ http_archive( # https://github.com/google/closure-compiler/blob/master/contrib/externs/polymer-1.0.js http_file( name = "polymer_closure", + downloaded_file_path = "polymer_closure.js", sha256 = "5a589bdba674e1fec7188e9251c8624ebf2d4d969beb6635f9148f420d1e08b1", urls = ["https://raw.githubusercontent.com/google/closure-compiler/775609aad61e14aef289ebec4bfc09ad88877f9e/contrib/externs/polymer-1.0.js"], ) diff --git a/lib/polymer_externs/BUILD b/lib/polymer_externs/BUILD index ae8f9c0ffe..2f1bdbded2 100644 --- a/lib/polymer_externs/BUILD +++ b/lib/polymer_externs/BUILD @@ -18,16 +18,9 @@ package( load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") -genrule( - name = "polymer_closure_renamed", - srcs = ["@polymer_closure//file"], - outs = ["polymer_closure_renamed.js"], - cmd = "cp $< $@", -) - closure_js_library( name = "polymer_closure", - srcs = [":polymer_closure_renamed"], + srcs = ["@polymer_closure//file"], data = ["//lib:LICENSE-Apache2.0"], no_closure_library = True, ) |