Skip to content

Commit

Permalink
Make contains_file() work across bazel versions (#132)
Browse files Browse the repository at this point in the history
Fixed #130
  • Loading branch information
hochhaus authored and jart committed Sep 15, 2016
1 parent 55aaa46 commit c29b38e
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 c29b38e

Please sign in to comment.