File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -119,16 +119,19 @@ tidy: #HELP Update dependencies.
119119.PHONY : manifests
120120KUSTOMIZE_CRDS_DIR := config/base/crd/bases
121121KUSTOMIZE_RBAC_DIR := config/base/rbac
122+
123+ # Needed because otherwise we exclude Go all files in vendor/github.com/proglottis/gpgme and fail
124+ CGO_ENABLED_CTRL_GEN := CGO_ENABLED=1 $(CONTROLLER_GEN )
122125manifests : $(CONTROLLER_GEN ) # EXHELP Generate WebhookConfiguration, ClusterRole, and CustomResourceDefinition objects.
123126 # To generate the manifests used and do not use catalogd directory
124- rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CONTROLLER_GEN ) crd paths=./api/... output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
125- rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CONTROLLER_GEN ) rbac:roleName=manager-role paths=./internal/operator-controller/... output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
127+ rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CGO_ENABLED_CTRL_GEN ) crd paths=./api/... output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
128+ rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CGO_ENABLED_CTRL_GEN ) rbac:roleName=manager-role paths=./internal/operator-controller/... output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
126129 # To generate the manifests for catalogd
127130 $(MAKE ) -C catalogd generate
128131
129132.PHONY : generate
130133generate : $(CONTROLLER_GEN ) # EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
131- $(CONTROLLER_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
134+ $(CGO_ENABLED_CTRL_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
132135
133136.PHONY : verify
134137verify : tidy fmt generate manifests crd-ref-docs # HELP Verify all generated code is up-to-date.
Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ clean: ## Remove binaries and test artifacts
6262KUSTOMIZE_CRDS_DIR := config/base/crd/bases
6363KUSTOMIZE_RBAC_DIR := config/base/rbac
6464KUSTOMIZE_WEBHOOKS_DIR := config/base/manager/webhook
65+ # Needed because otherwise we exclude Go all files in vendor/github.com/proglottis/gpgme and fail
66+ CGO_ENABLED_CTRL_GEN := CGO_ENABLED=1 $(CONTROLLER_GEN )
6567generate : $(CONTROLLER_GEN ) # # Generate code and manifests.
66- $(CONTROLLER_GEN ) object:headerFile=" ../hack/boilerplate.go.txt" paths=" ./..."
67- rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CONTROLLER_GEN ) crd paths=" ./api/..." output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
68- rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CONTROLLER_GEN ) rbac:roleName=manager-role paths=" ./internal/..." output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
69- rm -f $(KUSTOMIZE_WEBHOOKS_DIR ) /manifests.yaml && $(CONTROLLER_GEN ) webhook paths=" ./internal/..." output:webhook:artifacts:config=$(KUSTOMIZE_WEBHOOKS_DIR )
68+ $(CGO_ENABLED_CTRL_GEN ) object:headerFile=" ../hack/boilerplate.go.txt" paths=" ./..."
69+ rm -rf $(KUSTOMIZE_CRDS_DIR ) && $(CGO_ENABLED_CTRL_GEN ) crd paths=" ./api/..." output:crd:artifacts:config=$(KUSTOMIZE_CRDS_DIR )
70+ rm -f $(KUSTOMIZE_RBAC_DIR ) /role.yaml && $(CGO_ENABLED_CTRL_GEN ) rbac:roleName=manager-role paths=" ./internal/..." output:rbac:artifacts:config=$(KUSTOMIZE_RBAC_DIR )
71+ rm -f $(KUSTOMIZE_WEBHOOKS_DIR ) /manifests.yaml && $(CGO_ENABLED_CTRL_GEN ) webhook paths=" ./internal/..." output:webhook:artifacts:config=$(KUSTOMIZE_WEBHOOKS_DIR )
7072
7173# #@ Build
7274
You can’t perform that action at this time.
0 commit comments