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
8fca6fe2
Commit
8fca6fe2
authored
Aug 27, 2018
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the $GO_GENRULE_EXECROOT env var set by go_genrule
parent
6034bf68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
def.bzl
pkg/generated/openapi/def.bzl
+3
-4
No files found.
pkg/generated/openapi/def.bzl
View file @
8fca6fe2
...
...
@@ -36,17 +36,16 @@ def openapi_library(name, tags, srcs, go_prefix, vendor_prefix = "", openapi_tar
# All of bazel's $(location)s are relative to the original working directory, however,
# so we must save it first.
cmd = " ".join([
"ORIG_WD=$$(pwd);",
"cd $$GOPATH/src/" + go_prefix + ";",
"$$
ORIG_WD
/$(location //vendor/k8s.io/kube-openapi/cmd/openapi-gen)",
"$$
GO_GENRULE_EXECROOT
/$(location //vendor/k8s.io/kube-openapi/cmd/openapi-gen)",
"--v 1",
"--logtostderr",
"--go-header-file $$
ORIG_WD
/$(location //" + vendor_prefix + "hack/boilerplate:boilerplate.go.txt)",
"--go-header-file $$
GO_GENRULE_EXECROOT
/$(location //" + vendor_prefix + "hack/boilerplate:boilerplate.go.txt)",
"--output-file-base zz_generated.openapi",
"--output-package " + go_prefix + "pkg/generated/openapi",
"--report-filename tmp_api_violations.report",
"--input-dirs " + ",".join([go_prefix + target for target in openapi_targets] + [go_prefix + "vendor/" + target for target in vendor_targets]),
"&& cp $$GOPATH/src/" + go_prefix + "pkg/generated/openapi/zz_generated.openapi.go $$
ORIG_WD
/$(location :zz_generated.openapi.go)",
"&& cp $$GOPATH/src/" + go_prefix + "pkg/generated/openapi/zz_generated.openapi.go $$
GO_GENRULE_EXECROOT
/$(location :zz_generated.openapi.go)",
"&& rm tmp_api_violations.report",
]),
go_deps = deps,
...
...
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