diff options
Diffstat (limited to 'tools/build_defs/repo/git.bzl')
-rw-r--r-- | tools/build_defs/repo/git.bzl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/build_defs/repo/git.bzl b/tools/build_defs/repo/git.bzl index b4eacfd2af..7f49a16817 100644 --- a/tools/build_defs/repo/git.bzl +++ b/tools/build_defs/repo/git.bzl @@ -14,6 +14,8 @@ """Rules for cloning external git repositories.""" def _clone_or_update(ctx): + if (ctx.attr.verbose): + print('git.bzl: Cloning or updating repository %s' % ctx.name) if ((not ctx.attr.tag and not ctx.attr.commit) or (ctx.attr.tag and ctx.attr.commit)): fail('Exactly one of commit and tag must be provided') @@ -72,13 +74,14 @@ _common_attrs = { 'commit': attr.string(default=''), 'tag': attr.string(default=''), 'init_submodules': attr.bool(default=False), + 'verbose': attr.bool(default=False), } new_git_repository = repository_rule( implementation=_new_git_repository_implementation, attrs=_common_attrs + { - 'build_file': attr.label(), + 'build_file': attr.label(allow_single_file=True), 'build_file_content': attr.string(), } ) |