Skip to content

Commit

Permalink
Merge pull request #100 from Nordix/fix_codegen
Browse files Browse the repository at this point in the history
Fix codegeneration
  • Loading branch information
efiacor authored Sep 2, 2024
2 parents aff3f7a + 4e31462 commit 114895d
Show file tree
Hide file tree
Showing 22 changed files with 216 additions and 510 deletions.
24 changes: 15 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ else
endif
endif

# Modules are ordered in dependency order. A module precedes modules that depend on it.
MODULES = \
examples/apps/hello-server \
api \
. \
controllers \

.DEFAULT_GOAL := all

.PHONY: all
Expand Down Expand Up @@ -139,17 +132,30 @@ start-function-runner:
$(IMAGE_REPO)/$(PORCH_FUNCTION_RUNNER_IMAGE):$(IMAGE_TAG) \
-disable-runtimes pod


# API Modules
API_MODULES = \
api \
pkg/kpt/api \
controllers \

.PHONY: generate-api
generate-api:
KUBE_VERBOSE=2 $(CURDIR)/scripts/generate-api.sh

.PHONY: generate
generate: generate-api ## Generate CRDs, other K8s manifests and helper go code
@for f in $(MODULES); do (cd $$f; echo "Generating $$f"; go generate -v ./...) || exit 1; done
@for f in $(API_MODULES); do (cd $$f; echo "Generating for $$f ..."; go generate -v ./...) || exit 1; done

# Go Modules are ordered in dependency order. A module precedes modules that depend on it.
GO_MODULES = \
api \
. \
controllers \

.PHONY: tidy
tidy:
@for f in $(MODULES); do (cd $$f; echo "Tidying $$f"; go mod tidy) || exit 1; done
@for f in $(GO_MODULES); do (cd $$f; echo "Tidying $$f"; go mod tidy) || exit 1; done

.PHONY: configure-git
configure-git:
Expand Down
120 changes: 120 additions & 0 deletions api/generated/openapi/zz_generated.openapi.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.1
name: functions.config.porch.kpt.dev
spec:
group: config.porch.kpt.dev
Expand Down
Loading

0 comments on commit 114895d

Please sign in to comment.