From ed004207b43392d8d54f5a537284e8f32af4dddb Mon Sep 17 00:00:00 2001 From: John Millikin Date: Wed, 7 Jun 2017 14:39:15 -0700 Subject: [PATCH] Name generated BUILD files `BUILD.bazel` to avoid name conflicts. This allows `new_git_repository` to depend on codebases with pre-existing `BUILD` files from other tools, or `build/` directories in case-insensitive file systems. --- tools/build_defs/repo/git.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build_defs/repo/git.bzl b/tools/build_defs/repo/git.bzl index aa92252effc896..cf90acbddbe2f5 100644 --- a/tools/build_defs/repo/git.bzl +++ b/tools/build_defs/repo/git.bzl @@ -59,9 +59,9 @@ def _new_git_repository_implementation(ctx): _clone_or_update(ctx) ctx.file('WORKSPACE', "workspace(name = \"{name}\")\n".format(name=ctx.name)) if ctx.attr.build_file: - ctx.symlink(ctx.attr.build_file, 'BUILD') + ctx.symlink(ctx.attr.build_file, 'BUILD.bazel') else: - ctx.file('BUILD', ctx.attr.build_file_content) + ctx.file('BUILD.bazel', ctx.attr.build_file_content) def _git_repository_implementation(ctx): _clone_or_update(ctx)