Skip to content

Commit

Permalink
Make contains_file() work across bazel versions (bazelbuild#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
hochhaus authored and salvianreynaldi committed Oct 17, 2016
1 parent 60c2c2f commit c7d3947
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jdk:
env:
- V=HEAD URL=http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=linux-x86_64/lastSuccessfulBuild/artifact/output/ci/bazel--installer.sh FLAGS='--worker_verbose --strategy=Javac=worker --strategy=JsChecker=worker'
- V=0.3.0 URL=http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/bazel/releases/download/0.3.0/bazel-0.3.0-installer-linux-x86_64.sh FLAGS=''
- V=0.2.2b URL=http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/bazel/releases/download/0.2.2b/bazel-0.2.2b-installer-linux-x86_64.sh FLAGS=''

before_install:
- wget -O install.sh $URL
Expand Down
2 changes: 1 addition & 1 deletion closure/compiler/closure_js_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _impl(ctx):
if ctx.attr.pedantic:
args += JS_PEDANTIC_ARGS
args += ["--use_types_for_optimization"]
if contains_file(srcs, "external/closure_library/closure/goog/json/json.js"):
if contains_file(srcs, "../closure_library/closure/goog/json/json.js"):
# TODO(hochhaus): Make unknownDefines an error for user supplied defines.
# https://github.com/bazelbuild/rules_closure/issues/79
args += ["--jscomp_off=unknownDefines",
Expand Down
2 changes: 1 addition & 1 deletion closure/private/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def determine_js_language(ctx, normalize=False):
return language

def is_using_closure_library(srcs):
return contains_file(srcs, "external/closure_library/closure/goog/base.js")
return contains_file(srcs, "../closure_library/closure/goog/base.js")

def runpath(f):
"""Figures out the proper runfiles path for a file, using voodoo"""
Expand Down

0 comments on commit c7d3947

Please sign in to comment.