bazel: generate pkg/generated/bindata.go at build time

This commit is contained in:
Jeff Grafton
2018-04-11 15:22:26 -07:00
parent aab5cb4c34
commit b9a029db6d
5 changed files with 35 additions and 3 deletions

View File

@@ -5,6 +5,24 @@ load(
"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(
name = "go_default_library",
srcs = [