mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
bazel: generate pkg/generated/bindata.go at build time
This commit is contained in:
parent
aab5cb4c34
commit
b9a029db6d
@ -70,6 +70,7 @@ filegroup(
|
|||||||
"//staging:all-srcs",
|
"//staging:all-srcs",
|
||||||
"//test:all-srcs",
|
"//test:all-srcs",
|
||||||
"//third_party:all-srcs",
|
"//third_party:all-srcs",
|
||||||
|
"//translations:all-srcs",
|
||||||
"//vendor:all-srcs",
|
"//vendor:all-srcs",
|
||||||
],
|
],
|
||||||
tags = ["automanaged"],
|
tags = ["automanaged"],
|
||||||
|
@ -42,7 +42,7 @@ pushd "${KUBE_ROOT}" >/dev/null
|
|||||||
# These are files for e2e tests.
|
# These are files for e2e tests.
|
||||||
BINDATA_OUTPUT="test/e2e/generated/bindata.go"
|
BINDATA_OUTPUT="test/e2e/generated/bindata.go"
|
||||||
go-bindata -nometadata -o "${BINDATA_OUTPUT}.tmp" -pkg generated \
|
go-bindata -nometadata -o "${BINDATA_OUTPUT}.tmp" -pkg generated \
|
||||||
-ignore .jpg -ignore .png -ignore .md \
|
-ignore .jpg -ignore .png -ignore .md -ignore 'BUILD(\.bazel)?' \
|
||||||
"test/e2e/testing-manifests/..." \
|
"test/e2e/testing-manifests/..." \
|
||||||
"test/images/..." \
|
"test/images/..." \
|
||||||
"test/fixtures/..."
|
"test/fixtures/..."
|
||||||
@ -64,7 +64,7 @@ rm -f "${BINDATA_OUTPUT}.tmp"
|
|||||||
# These are files for runtime code
|
# These are files for runtime code
|
||||||
BINDATA_OUTPUT="pkg/generated/bindata.go"
|
BINDATA_OUTPUT="pkg/generated/bindata.go"
|
||||||
go-bindata -nometadata -nocompress -o "${BINDATA_OUTPUT}.tmp" -pkg generated \
|
go-bindata -nometadata -nocompress -o "${BINDATA_OUTPUT}.tmp" -pkg generated \
|
||||||
-ignore .jpg -ignore .png -ignore .md \
|
-ignore .jpg -ignore .png -ignore .md -ignore 'BUILD(\.bazel)?' \
|
||||||
"translations/..."
|
"translations/..."
|
||||||
|
|
||||||
gofmt -s -w "${BINDATA_OUTPUT}.tmp"
|
gofmt -s -w "${BINDATA_OUTPUT}.tmp"
|
||||||
|
@ -5,6 +5,24 @@ load(
|
|||||||
"go_library",
|
"go_library",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "bindata",
|
||||||
|
srcs = [
|
||||||
|
"//translations:all-srcs",
|
||||||
|
],
|
||||||
|
outs = ["bindata.go"],
|
||||||
|
cmd = """
|
||||||
|
$(location //vendor/github.com/jteeuwen/go-bindata/go-bindata:go-bindata) \
|
||||||
|
-nometadata -nocompress -o "$(OUTS)" -pkg generated \
|
||||||
|
-prefix $$(pwd) \
|
||||||
|
-ignore .jpg -ignore .png -ignore .md -ignore 'BUILD(\.bazel)?' \
|
||||||
|
$(SRCS)
|
||||||
|
""",
|
||||||
|
tools = [
|
||||||
|
"//vendor/github.com/jteeuwen/go-bindata/go-bindata",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
@ -30,7 +30,7 @@ genrule(
|
|||||||
$(location //vendor/github.com/jteeuwen/go-bindata/go-bindata:go-bindata) \
|
$(location //vendor/github.com/jteeuwen/go-bindata/go-bindata:go-bindata) \
|
||||||
-nometadata -o "$(OUTS)" -pkg generated \
|
-nometadata -o "$(OUTS)" -pkg generated \
|
||||||
-prefix $$(pwd) \
|
-prefix $$(pwd) \
|
||||||
-ignore .jpg -ignore .png -ignore .md \
|
-ignore .jpg -ignore .png -ignore .md -ignore 'BUILD(\.bazel)?' \
|
||||||
$(SRCS)
|
$(SRCS)
|
||||||
""",
|
""",
|
||||||
tools = [
|
tools = [
|
||||||
|
13
translations/BUILD
Normal file
13
translations/BUILD
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
filegroup(
|
||||||
|
name = "package-srcs",
|
||||||
|
srcs = glob(["**"]),
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "all-srcs",
|
||||||
|
srcs = [":package-srcs"],
|
||||||
|
tags = ["automanaged"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user