Skip to content

Commit

Permalink
Improve Makefile for clientset and gen bins (#1079)
Browse files Browse the repository at this point in the history
* Improve Makefile for clientset and gen bins

Signed-off-by: Vince Prignano <[email protected]>

* use bazel clean

Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri authored and k8s-ci-robot committed Jun 26, 2019
1 parent 377ad4e commit fabb25e
Show file tree
Hide file tree
Showing 63 changed files with 83 additions and 68 deletions.
27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ manager: lint-full ## Build manager binary
clusterctl: lint-full ## Build clusterctl binary
go build -o bin/clusterctl sigs.k8s.io/cluster-api/cmd/clusterctl

bin/%-gen: ./vendor/k8s.io/code-generator/cmd/%-gen ## Build code-generator binaries
go build -o $@ ./$<

.PHONY: run
run: lint ## Run against the configured Kubernetes cluster in ~/.kube/config
go run ./cmd/manager/main.go
Expand Down Expand Up @@ -97,19 +100,18 @@ generate-go: ## Runs go generate
go generate ./pkg/... ./cmd/...

.PHONY: generate-clientset
generate-clientset: ## Generate a typed clientset
rm -rf pkg/client
go run ./vendor/k8s.io/code-generator/cmd/client-gen/main.go \
generate-clientset: clean-clientset bin/client-gen bin/lister-gen bin/informer-gen ## Generate a typed clientset
bin/client-gen \
--clientset-name clientset \
--input-base sigs.k8s.io/cluster-api/pkg/apis \
--input deprecated/v1alpha1,cluster/v1alpha2 \
--output-package sigs.k8s.io/cluster-api/pkg/client/clientset_generated \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
go run ./vendor/k8s.io/code-generator/cmd/lister-gen/main.go \
bin/lister-gen \
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
--output-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
go run ./vendor/k8s.io/code-generator/cmd/informer-gen/main.go \
bin/informer-gen \
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
--versioned-clientset-package sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset \
--listers-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \
Expand Down Expand Up @@ -190,7 +192,20 @@ docker-push-manifest: ## Push the fat manifest docker image. TODO: Update bazel

.PHONY: clean
clean: ## Remove all generated files
rm -f bazel-*
$(MAKE) clean-bazel
$(MAKE) clean-bin

.PHONY: clean-bazel
clean-bazel: ## Remove all generated bazel symlinks
bazel clean

.PHONY: clean-bin
clean-bin: ## Remove all generated binaries
rm -rf bin

.PHONY: clean-clientset
clean-clientset: ## Remove all generated clientset files
rm -rf pkg/client

.PHONY: verify
verify:
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/clientset_generated/clientset/clientset.go

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

2 changes: 1 addition & 1 deletion pkg/client/clientset_generated/clientset/doc.go

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

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

2 changes: 1 addition & 1 deletion pkg/client/clientset_generated/clientset/fake/doc.go

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

2 changes: 1 addition & 1 deletion pkg/client/clientset_generated/clientset/fake/register.go

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

2 changes: 1 addition & 1 deletion pkg/client/clientset_generated/clientset/scheme/doc.go

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading

0 comments on commit fabb25e

Please sign in to comment.