Merge pull request #3689 from chrislovecnm/go-bindata-bazel

Automatic merge from submit-queue.

bazel updates to generate go-bindata

Fixes: https://github.com/kubernetes/kops/issues/3626
This commit is contained in:
Kubernetes Submit Queue 2017-10-25 20:09:08 -07:00 committed by GitHub
commit f3454f95d7
2 changed files with 37 additions and 0 deletions

View File

@ -5,3 +5,18 @@ go_library(
srcs = ["bindata.go"],
visibility = ["//visibility:public"],
)
genrule(
name = "bindata",
srcs = glob(["*"], exclude=["bindata.go", "BUILD.bazel"]),
outs = ["bindata.go"],
cmd = """
$(location //vendor/github.com/jteeuwen/go-bindata/go-bindata:go-bindata) \
-o "$(OUTS)" -pkg model \
-prefix $$(pwd) \
-prefix federation/model $(SRCS)
""",
tools = [
"//vendor/github.com/jteeuwen/go-bindata/go-bindata",
],
)

View File

@ -12,3 +12,25 @@ go_library(
"//vendor/github.com/google/cadvisor/pages/static:go_default_library",
],
)
genrule(
name = "bindata",
srcs = glob(
["**"],
exclude = [
"bindata.go",
"vfs.go",
"BUILD.bazel",
],
),
outs = ["bindata.go"],
cmd = """
$(location //vendor/github.com/jteeuwen/go-bindata/go-bindata:go-bindata) \
-o "$(OUTS)" -pkg models \
-prefix $$(pwd) \
-prefix upup/models $(SRCS)
""",
tools = [
"//vendor/github.com/jteeuwen/go-bindata/go-bindata",
],
)