Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Use BUILD.bazel instead of BUILD for external projects
Browse files Browse the repository at this point in the history
While upgrading an internal project from 0.10 to 0.13 we have found that we no longer were able to build one of external non-basel dependencies that already has a lowercase `build` directory in their repo.

As the name `BUILD` is much more common than `BUILD.bazel`, in particular on file systems that are case-insensitive, I propose to generate the latter by default.

Closes bazelbuild#5146.

PiperOrigin-RevId: 199264025
  • Loading branch information
DarkDimius authored and Rob Figueiredo committed Jun 26, 2018
1 parent 76d62a5 commit 8cad741
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/build_defs/repo/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def workspace_and_buildfile(ctx):
if ctx.attr.build_file:
bash_exe = ctx.os.environ["BAZEL_SH"] if "BAZEL_SH" in ctx.os.environ else "bash"
ctx.execute([bash_exe, "-c", "rm -f BUILD BUILD.bazel"])
ctx.symlink(ctx.attr.build_file, "BUILD")
ctx.symlink(ctx.attr.build_file, "BUILD.bazel")
elif ctx.attr.build_file_content:
bash_exe = ctx.os.environ["BAZEL_SH"] if "BAZEL_SH" in ctx.os.environ else "bash"
ctx.execute([bash_exe, "-c", "rm -f BUILD.bazel"])
ctx.file("BUILD", ctx.attr.build_file_content)
ctx.file("BUILD.bazel", ctx.attr.build_file_content)

def patch(ctx):
"""Implementation of patching an already extracted repository"""
Expand Down

0 comments on commit 8cad741

Please sign in to comment.