@@ -179,15 +179,15 @@ kind-cluster: ## Create a new kind cluster designed for testing with Tilt
179
179
180
180
.PHONY : manager-core
181
181
manager-core : # # Build core manager binary
182
- go build -ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /manager sigs.k8s.io/cluster-api
182
+ go build -trimpath - ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /manager sigs.k8s.io/cluster-api
183
183
184
184
.PHONY : manager-kubeadm-bootstrap
185
185
manager-kubeadm-bootstrap : # # Build kubeadm bootstrap manager
186
- go build -ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /kubeadm-bootstrap-manager sigs.k8s.io/cluster-api/bootstrap/kubeadm
186
+ go build -trimpath - ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /kubeadm-bootstrap-manager sigs.k8s.io/cluster-api/bootstrap/kubeadm
187
187
188
188
.PHONY : manager-kubeadm-control-plane
189
189
manager-kubeadm-control-plane : # # Build kubeadm control plane manager
190
- go build -ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /kubeadm-control-plane-manager sigs.k8s.io/cluster-api/controlplane/kubeadm
190
+ go build -trimpath - ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /kubeadm-control-plane-manager sigs.k8s.io/cluster-api/controlplane/kubeadm
191
191
192
192
.PHONY : managers
193
193
managers : # # Build all managers
@@ -197,31 +197,31 @@ managers: ## Build all managers
197
197
198
198
.PHONY : clusterctl
199
199
clusterctl : # # Build clusterctl binary
200
- go build -ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /clusterctl sigs.k8s.io/cluster-api/cmd/clusterctl
200
+ go build -trimpath - ldflags " $( LDFLAGS) " -o $(BIN_DIR ) /clusterctl sigs.k8s.io/cluster-api/cmd/clusterctl
201
201
202
202
$(SETUP_ENVTEST ) : $(TOOLS_DIR ) /go.mod # Build setup-envtest from tools folder.
203
- cd $(TOOLS_DIR ) ; go build -tags=tools -o $(BIN_DIR ) /setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest
203
+ cd $(TOOLS_DIR ) ; go build -trimpath - tags=tools -o $(BIN_DIR ) /setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest
204
204
205
205
$(CONTROLLER_GEN ) : $(TOOLS_DIR ) /go.mod # Build controller-gen from tools folder.
206
- cd $(TOOLS_DIR ) ; go build -tags=tools -o $(BIN_DIR ) /controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
206
+ cd $(TOOLS_DIR ) ; go build -trimpath - tags=tools -o $(BIN_DIR ) /controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
207
207
208
208
$(GOTESTSUM ) : $(TOOLS_DIR ) /go.mod # Build gotestsum from tools folder.
209
- cd $(TOOLS_DIR ) ; go build -tags=tools -o $(BIN_DIR ) /gotestsum gotest.tools/gotestsum
209
+ cd $(TOOLS_DIR ) ; go build -trimpath - tags=tools -o $(BIN_DIR ) /gotestsum gotest.tools/gotestsum
210
210
211
211
$(CONVERSION_GEN ) : $(TOOLS_DIR ) /go.mod
212
- cd $(TOOLS_DIR ) ; go build -tags=tools -o $(BIN_DIR ) /conversion-gen k8s.io/code-generator/cmd/conversion-gen
212
+ cd $(TOOLS_DIR ) ; go build -trimpath - tags=tools -o $(BIN_DIR ) /conversion-gen k8s.io/code-generator/cmd/conversion-gen
213
213
214
214
$(CONVERSION_VERIFIER ) : $(TOOLS_DIR ) /go.mod
215
215
cd $(TOOLS_DIR ) ; go build -tags=tools -o $(BIN_DIR ) /conversion-verifier sigs.k8s.io/cluster-api/hack/tools/conversion-verifier
216
216
217
217
$(GO_APIDIFF ) : $(TOOLS_DIR ) /go.mod
218
- cd $(TOOLS_DIR ) && go build -tags=tools -o $(GO_APIDIFF_BIN ) github.com/joelanford/go-apidiff
218
+ cd $(TOOLS_DIR ) && go build -trimpath - tags=tools -o $(GO_APIDIFF_BIN ) github.com/joelanford/go-apidiff
219
219
220
220
$(ENVSUBST ) : $(TOOLS_DIR ) /go.mod
221
- cd $(TOOLS_DIR ) && go build -tags=tools -o $(ENVSUBST_BIN ) github.com/drone/envsubst/v2/cmd/envsubst
221
+ cd $(TOOLS_DIR ) && go build -trimpath - tags=tools -o $(ENVSUBST_BIN ) github.com/drone/envsubst/v2/cmd/envsubst
222
222
223
223
$(YQ ) : $(TOOLS_DIR ) /go.mod
224
- cd $(TOOLS_DIR ) && go build -tags=tools -o $(YQ_BIN ) github.com/mikefarah/yq/v4
224
+ cd $(TOOLS_DIR ) && go build -trimpath - tags=tools -o $(YQ_BIN ) github.com/mikefarah/yq/v4
225
225
226
226
$(KUSTOMIZE ) : # Download kustomize using hack script into tools folder.
227
227
hack/ensure-kustomize.sh
0 commit comments