@@ -200,28 +200,28 @@ clusterctl: ## Build clusterctl binary
200
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 -trimpath - tags=tools -o $(BIN_DIR ) /setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest
203
+ cd $(TOOLS_DIR ) ; go build -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 -trimpath - tags=tools -o $(BIN_DIR ) /controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
206
+ cd $(TOOLS_DIR ) ; go build -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 -trimpath - tags=tools -o $(BIN_DIR ) /gotestsum gotest.tools/gotestsum
209
+ cd $(TOOLS_DIR ) ; go build -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 -trimpath - tags=tools -o $(BIN_DIR ) /conversion-gen k8s.io/code-generator/cmd/conversion-gen
212
+ cd $(TOOLS_DIR ) ; go build -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 -trimpath - tags=tools -o $(GO_APIDIFF_BIN ) github.com/joelanford/go-apidiff
218
+ cd $(TOOLS_DIR ) && go build -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 -trimpath - tags=tools -o $(ENVSUBST_BIN ) github.com/drone/envsubst/v2/cmd/envsubst
221
+ cd $(TOOLS_DIR ) && go build -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 -trimpath - tags=tools -o $(YQ_BIN ) github.com/mikefarah/yq/v4
224
+ cd $(TOOLS_DIR ) && go build -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
@@ -587,10 +587,11 @@ release-manifests-dev: ## Builds the development manifests and copies them in th
587
587
cp $(CAPD_DIR ) /templates/* $(RELEASE_DIR ) /
588
588
589
589
release-binaries : # # Builds the binaries to publish with a release
590
- RELEASE_BINARY=./cmd/clusterctl GOOS=linux GOARCH=amd64 $(MAKE ) release-binary
591
- RELEASE_BINARY=./cmd/clusterctl GOOS=linux GOARCH=arm64 $(MAKE ) release-binary
592
- RELEASE_BINARY=./cmd/clusterctl GOOS=darwin GOARCH=amd64 $(MAKE ) release-binary
593
- RELEASE_BINARY=./cmd/clusterctl GOOS=darwin GOARCH=arm64 $(MAKE ) release-binary
590
+ RELEASE_BINARY=clusterctl-linux-amd64 BUILD_PATH=./cmd/clusterctl GOOS=linux GOARCH=amd64 $(MAKE ) release-binary
591
+ RELEASE_BINARY=clusterctl-linux-arm64 BUILD_PATH=./cmd/clusterctl GOOS=linux GOARCH=arm64 $(MAKE ) release-binary
592
+ RELEASE_BINARY=clusterctl-darwin-amd64 BUILD_PATH=./cmd/clusterctl GOOS=darwin GOARCH=amd64 $(MAKE ) release-binary
593
+ RELEASE_BINARY=clusterctl-darwin-arm64 BUILD_PATH=./cmd/clusterctl GOOS=darwin GOARCH=arm64 $(MAKE ) release-binary
594
+ RELEASE_BINARY=clusterctl-windows-amd64.exe BUILD_PATH=./cmd/clusterctl GOOS=windows GOARCH=amd64 $(MAKE ) release-binary
594
595
595
596
release-binary : $(RELEASE_DIR )
596
597
docker run \
@@ -601,8 +602,8 @@ release-binary: $(RELEASE_DIR)
601
602
-v " $$ (pwd):/workspace$( DOCKER_VOL_OPTS) " \
602
603
-w /workspace \
603
604
golang:$(GO_VERSION ) \
604
- go build -a -ldflags " $( LDFLAGS) -extldflags '-static'" \
605
- -o $(RELEASE_DIR ) /$(notdir $(RELEASE_BINARY ) ) - $( GOOS ) - $( GOARCH ) $(RELEASE_BINARY )
605
+ go build -a -trimpath - ldflags " $( LDFLAGS) -extldflags '-static'" \
606
+ -o $(RELEASE_DIR ) /$(notdir $(RELEASE_BINARY ) ) $(BUILD_PATH )
606
607
607
608
.PHONY : release-staging
608
609
release-staging : # # Builds and push container images to the staging bucket.
0 commit comments