Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b9a029db
Commit
b9a029db
authored
Apr 11, 2018
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bazel: generate pkg/generated/bindata.go at build time
parent
aab5cb4c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
3 deletions
+35
-3
BUILD.root
build/root/BUILD.root
+1
-0
generate-bindata.sh
hack/generate-bindata.sh
+2
-2
BUILD
pkg/generated/BUILD
+18
-0
BUILD
test/e2e/generated/BUILD
+1
-1
BUILD
translations/BUILD
+13
-0
No files found.
build/root/BUILD.root
View file @
b9a029db
...
...
@@ -70,6 +70,7 @@ filegroup(
"//staging:all-srcs",
"//test:all-srcs",
"//third_party:all-srcs",
"//translations:all-srcs",
"//vendor:all-srcs",
],
tags = ["automanaged"],
...
...
hack/generate-bindata.sh
View file @
b9a029db
...
...
@@ -42,7 +42,7 @@ pushd "${KUBE_ROOT}" >/dev/null
# These are files for e2e tests.
BINDATA_OUTPUT
=
"test/e2e/generated/bindata.go"
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/images/..."
\
"test/fixtures/..."
...
...
@@ -64,7 +64,7 @@ rm -f "${BINDATA_OUTPUT}.tmp"
# These are files for runtime code
BINDATA_OUTPUT
=
"pkg/generated/bindata.go"
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/..."
gofmt
-s
-w
"
${
BINDATA_OUTPUT
}
.tmp"
...
...
pkg/generated/BUILD
View file @
b9a029db
...
...
@@ -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 = [
...
...
test/e2e/generated/BUILD
View file @
b9a029db
...
...
@@ -30,7 +30,7 @@ genrule(
$(location //vendor/github.com/jteeuwen/go-bindata/go-bindata:go-bindata) \
-nometadata -o "$(OUTS)" -pkg generated \
-prefix $$(pwd) \
-ignore .jpg -ignore .png -ignore .md \
-ignore .jpg -ignore .png -ignore .md
-ignore 'BUILD(\.bazel)?'
\
$(SRCS)
""",
tools = [
...
...
translations/BUILD
0 → 100644
View file @
b9a029db
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment