blob: 31e8958461d0095158626a2a77bf5f02110a49d0 [file] [log] [blame]
# Scripts for IDE / Environment support for Bazel
package(default_visibility = ["//visibility:private"])
# The master copy of the completion logic are bazel-complete-template.bash
# and bazel-complete-header.bash.
# This is where you should make edits.
genrule(
name = "bash_completion",
srcs = ["bazel-complete-template.bash"],
outs = ["bazel-complete.bash"],
cmd = " ".join([
"$(location :generate_bash_completion.sh)",
"--bazel=$(location //src:bazel)",
"--output=$@",
"--prepend=$(location bazel-complete-template.bash)",
]),
output_to_bindir = 1,
tools = [
":generate_bash_completion.sh",
"//src:bazel",
],
visibility = ["//scripts/packages:__subpackages__"],
)
sh_test(
name = "bash_completion_test",
size = "small",
srcs = ["bash_completion_test.sh"],
data = [
"bazel-complete.bash",
"testenv.sh",
"//src/test/shell:bashunit",
],
)
filegroup(
name = "srcs",
srcs = glob(["**"]) + [
"//scripts/docs:srcs",
"//scripts/packages:srcs",
"//scripts/release:srcs",
],
visibility = ["//:__pkg__"],
)