Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add genrule for hack/update-bindata.sh #35373

Merged
merged 4 commits into from
Oct 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Godeps/LICENSES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ filegroup(
"pod",
],
)

filegroup(
name = "sources",
srcs = glob([
"**/*",
]),
)
1 change: 1 addition & 0 deletions hack/godep-save.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GODEP="${GODEP:-godep}"
REQUIRED_BINS=(
"github.com/ugorji/go/codec/codecgen"
"github.com/onsi/ginkgo/ginkgo"
"github.com/jteeuwen/go-bindata/go-bindata"
"./..."
)

Expand Down
1 change: 0 additions & 1 deletion hack/update-bindata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ BINDATA_OUTPUT="${KUBE_ROOT}/test/e2e/generated/bindata.go"
go-bindata -nometadata -prefix "${KUBE_ROOT}" -o "${BINDATA_OUTPUT}.tmp" -pkg generated \
-ignore .jpg -ignore .png -ignore .md \
"${KUBE_ROOT}/examples/..." \
"${KUBE_ROOT}/docs/user-guide/..." \
"${KUBE_ROOT}/test/e2e/testing-manifests/..." \
"${KUBE_ROOT}/test/images/..." \
"${KUBE_ROOT}/test/fixtures/..."
Expand Down
6 changes: 3 additions & 3 deletions hack/update-godep-licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ process_content () {
# Sadly inconsistent in the wild, but mostly license files
# containing copyrights, but no readme/notice files containing
# licenses (except to "see license file")
ensure_pattern="License|Copyright"
ensure_pattern="license|copyright"
;;
# We search READMEs for copyrights and this includes notice files as well
# Look in as many places as we find files matching
COPYRIGHT) find_names=(-iname 'notice*' -o -iname 'readme*')
find_maxdepth=3
ensure_pattern="Copyright"
ensure_pattern="copyright"
;;
esac

Expand Down Expand Up @@ -97,7 +97,7 @@ process_content () {
if [[ -z "${CONTENT[${index}]-}" ]]; then
for f in ${local_files[@]-}; do
# Find some copyright info in any file and break
if egrep -wq "${ensure_pattern}" "${f}"; then
if egrep -i -wq "${ensure_pattern}" "${f}"; then
CONTENT[${index}]="${f}"
break
fi
Expand Down
27 changes: 25 additions & 2 deletions test/e2e/generated/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@ load(

go_library(
name = "go_default_library",
srcs = ["main.go"],
tags = ["automanaged"],
srcs = [
"main.go",
":bindata",
],
)

genrule(
name = "bindata",
srcs = [
"//examples:sources",
"//test/images:sources",
"//test/fixtures:sources",
"//test/e2e/testing-manifests:sources",
],
outs = ["bindata.go"],
cmd = """
$(location //vendor:github.com/jteeuwen/go-bindata/go-bindata) \
-nometadata -o "$(OUTS)" -pkg generated \
-prefix $$(pwd) \
-ignore .jpg -ignore .png -ignore .md \
$(SRCS)
""",
tools = [
"//vendor:github.com/jteeuwen/go-bindata/go-bindata",
],
)
8 changes: 8 additions & 0 deletions test/e2e/testing-manifests/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "sources",
srcs = glob([
"**/*",
]),
)
7 changes: 7 additions & 0 deletions test/fixtures/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ filegroup(
"**/*.json",
]),
)

filegroup(
name = "sources",
srcs = glob([
"**/*",
]),
)
8 changes: 8 additions & 0 deletions test/images/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "sources",
srcs = glob([
"**/*",
]),
)