Skip to content

[WIP] ✨ Update to code-generator/v3 #45

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

Open
wants to merge 11 commits into
base: kcp-1.32.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 3 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ GOBIN_DIR=$(abspath ./bin )
PATH := $(GOBIN_DIR):$(TOOLS_GOBIN_DIR):$(PATH)
TMPDIR := $(shell mktemp -d)

CODE_GENERATOR_VER := 572c29375f0e63c13b31c70931914c420a0a9d59
CODE_GENERATOR_BIN := code-generator
CODE_GENERATOR := $(TOOLS_DIR)/$(CODE_GENERATOR_BIN)-$(CODE_GENERATOR_VER)
export CODE_GENERATOR # so hack scripts can use it

$(CODE_GENERATOR):
GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/kcp-dev/code-generator/v2 $(CODE_GENERATOR_BIN) $(CODE_GENERATOR_VER)

OPENSHIFT_GOIMPORTS_VER := c70783e636f2213cac683f6865d88c5edace3157
OPENSHIFT_GOIMPORTS_BIN := openshift-goimports
OPENSHIFT_GOIMPORTS := $(TOOLS_DIR)/$(OPENSHIFT_GOIMPORTS_BIN)-$(OPENSHIFT_GOIMPORTS_VER)
Expand All @@ -56,7 +48,7 @@ lint: $(GOLANGCI_LINT)
tools: $(CODE_GENERATOR) $(OPENSHIFT_GOIMPORTS) $(GOLANGCI_LINT)
.PHONY: tools

codegen: $(CODE_GENERATOR)
codegen:
go mod download
./hack/update-codegen.sh
$(MAKE) imports
Expand All @@ -79,4 +71,5 @@ verify: verify-codegen

.PHONY: clean-generated
clean-generated:
grep --exclude Makefile -l 'Code generated by kcp code-generator. DO NOT EDIT.' -r . | xargs rm
grep --exclude Makefile -l -e 'Code generated by [a-z-]*. DO NOT EDIT.' -r . | xargs rm -f
find . -type d -empty -delete
28 changes: 19 additions & 9 deletions apiextensions/client/clientset.go

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

97 changes: 63 additions & 34 deletions apiextensions/client/fake/clientset.go

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

20 changes: 20 additions & 0 deletions apiextensions/client/fake/doc.go

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

58 changes: 58 additions & 0 deletions apiextensions/client/fake/register.go

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

20 changes: 20 additions & 0 deletions apiextensions/client/scheme/doc.go

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

Loading