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

Isolate SRC_DIRS for generate-go-conversions target #76

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,16 @@ $(CONVERSION_GEN): $(LOCALBIN) # Build conversion-gen from tools folder.
GOBIN=$(LOCALBIN) $(GO_INSTALL) $(CONVERSION_GEN_PKG) $(CONVERSION_GEN_BIN) $(CONVERSION_GEN_VER)

.PHONY: generate-go-conversions
# The SRC_DIRS value is a comma-separated list of paths to old versions.
# The SRC_DIRS value is a space-separated list of paths to old versions.
# The --input-dirs value is a single path item; specify multiple --input-dirs
# parameters if you have multiple old versions.
SRC_DIRS=./api/v1alpha1
generate-go-conversions: $(CONVERSION_GEN) ## Generate conversions go code
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha1"
$(MAKE) clean-generated-conversions SRC_DIRS="$(SRC_DIRS)"
$(CONVERSION_GEN) \
--output-file=zz_generated.conversion.go \
--go-header-file=./hack/boilerplate.go.txt \
./api/v1alpha1
$(SRC_DIRS)

.PHONY: clean-generated-conversions
clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs
Expand Down
Loading