diff options
author | Dmitry Petrashko <dark@d-d.me> | 2018-06-05 02:09:12 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-05 02:11:39 -0700 |
commit | 4ec0a7524913ab2c4641368e3f8c09b347351a08 (patch) | |
tree | 005f58198a63a302a4a6d0e64cb4b1c45fdbe049 /tools | |
parent | 1b041c86147098451bffc94d2602aea26ee16e06 (diff) |
Use BUILD.bazel instead of BUILD for external projects
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 #5146.
PiperOrigin-RevId: 199264025
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_defs/repo/utils.bzl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/build_defs/repo/utils.bzl b/tools/build_defs/repo/utils.bzl index f355f9a30e..b76bac960e 100644 --- a/tools/build_defs/repo/utils.bzl +++ b/tools/build_defs/repo/utils.bzl @@ -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""" |