This repository was archived by the owner on Aug 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ GOLANGCI_LINT_BIN := golangci-lint
79
79
GOLANGCI_LINT := $(TOOLS_BIN_DIR ) /$(GOLANGCI_LINT_BIN ) -$(GOLANGCI_LINT_VER )
80
80
81
81
# Keep at 4.0.4 until we figure out how to get later verisons to not mangle the calico yamls
82
+ # HACK bump latest version once https://github.com/kubernetes-sigs/kustomize/issues/947 is fixed
82
83
KUSTOMIZE_VER := v4.0.4
83
84
KUSTOMIZE_BIN := kustomize
84
85
KUSTOMIZE := $(TOOLS_BIN_DIR ) /$(KUSTOMIZE_BIN ) -$(KUSTOMIZE_VER )
@@ -224,8 +225,13 @@ $(ENVSUBST): ## Build envsubst from tools folder.
224
225
$(GOLANGCI_LINT ) : # # Build golangci-lint from tools folder.
225
226
GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) github.com/golangci/golangci-lint/cmd/golangci-lint $(GOLANGCI_LINT_BIN ) $(GOLANGCI_LINT_VER )
226
227
227
- $(KUSTOMIZE ) : # # Build kustomize from tools folder.
228
- GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) sigs.k8s.io/kustomize/kustomize/v4 $(KUSTOMIZE_BIN ) $(KUSTOMIZE_VER )
228
+ # # HACK replace with $(GO_INSTALL) once https://github.com/kubernetes-sigs/kustomize/issues/947 is fixed
229
+ $(KUSTOMIZE ) : # # Put kustomize into tools folder.
230
+ mkdir -p $(TOOLS_BIN_DIR )
231
+ rm -f $(TOOLS_BIN_DIR ) /$(KUSTOMIZE_BIN ) *
232
+ curl -fsSL " https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- $(KUSTOMIZE_VER:v%=% ) $(TOOLS_BIN_DIR )
233
+ mv " $( TOOLS_BIN_DIR) /$( KUSTOMIZE_BIN) " $(KUSTOMIZE )
234
+ ln -sf $(KUSTOMIZE ) " $( TOOLS_BIN_DIR) /$( KUSTOMIZE_BIN) "
229
235
230
236
$(CONTROLLER_GEN ) : # # Build controller-gen from tools folder.
231
237
GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) sigs.k8s.io/controller-tools/cmd/controller-gen $(CONTROLLER_GEN_BIN ) $(CONTROLLER_GEN_VER )
Original file line number Diff line number Diff line change @@ -37,20 +37,9 @@ if [ -z "${GOBIN}" ]; then
37
37
exit 1
38
38
fi
39
39
40
- tmp_dir=$( mktemp -d -t goinstall_XXXXXXXXXX)
41
- function clean {
42
- rm -rf " ${tmp_dir} "
43
- }
44
- trap clean EXIT
45
-
46
40
rm " ${GOBIN} /${2} " * || true
47
41
48
- cd " ${tmp_dir} "
49
-
50
- # create a new module in the tmp directory
51
- go mod init fake/mod
52
-
53
42
# install the golang module specified as the first argument
54
- go get -tags tools " ${1} @${3} "
43
+ go install -tags tools " ${1} @${3} "
55
44
mv " ${GOBIN} /${2} " " ${GOBIN} /${2} -${3} "
56
45
ln -sf " ${GOBIN} /${2} -${3} " " ${GOBIN} /${2} "
You can’t perform that action at this time.
0 commit comments