cert-manager/hack/BUILD.bazel
Ashley Davis 642161a963
make update-all & ensure bazel-only targets are runnable
this allows us to maintain the bazel build files until they're removed,
but tries to avoid accidentally encouraging their use

`make update-all` implementes a non-bazel version of
`hack/update-all.sh`, with `hack/update-all.sh` now calling make but
also doing the bazel stuff it used to.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-06-30 12:47:30 +01:00

102 lines
1.9 KiB
Python

package(default_visibility = ["//visibility:public"])
GAZELLE = "@bazel_gazelle//cmd/gazelle"
KAZEL = "@io_k8s_repo_infra//cmd/kazel"
GO = "@go_sdk//:bin/go"
GOROOT = "@go_sdk//:files"
GOFMT = "@go_sdk//:bin/gofmt"
YQ = "//hack/bin:yq"
CONTROLLER_GEN = "@io_k8s_sigs_controller_tools//cmd/controller-gen"
# Bazel file generation rules
sh_binary(
name = "update-deps",
srcs = ["update-deps.sh"],
args = [
"$(location %s)" % GO,
"$(location %s)" % GAZELLE,
"$(location %s)" % KAZEL,
"$(location :update-bazel)",
"$(location :update-deps-licenses)",
],
data = [
GAZELLE,
GO,
KAZEL,
":update-bazel",
":update-deps-licenses",
],
tags = ["manual"],
)
sh_binary(
name = "update-bazel",
srcs = ["update-bazel.sh"],
args = [
"$(location %s)" % GAZELLE,
"$(location %s)" % KAZEL,
],
data = [
GAZELLE,
KAZEL,
],
tags = ["manual"],
)
sh_binary(
name = "update-deps-licenses",
srcs = ["update-deps-licenses.sh"],
args = [
"$(location %s)" % GO,
],
data = [
GO,
],
tags = ["manual"],
)
sh_test(
name = "verify-bazel",
srcs = ["verify-bazel.sh"],
args = [
"$(location %s)" % GAZELLE,
"$(location %s)" % KAZEL,
],
data = [
"@//:all-srcs",
GAZELLE,
KAZEL,
],
tags = [
"lint",
"manual",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//hack/bin:all-srcs",
"//hack/boilerplate:all-srcs",
"//hack/build:all-srcs",
"//hack/extractcrd:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)