Skip to content

Commit f02830f

Browse files
committed
Use go install instead of go get for installing tools.
Using go get to install tools is no longer supported as of Go 1.18. See https://tip.golang.org/doc/go1.18 for more details.
1 parent f96fe8a commit f02830f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ controller-gen: ## Download controller-gen locally if necessary.
126126

127127
KUSTOMIZE = $(shell pwd)/bin/kustomize
128128
kustomize: ## Download kustomize locally if necessary.
129-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
129+
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
130130

131131
# go-get-tool will 'go get' any package $2 and install it to $1.
132132
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
@@ -137,7 +137,7 @@ TMP_DIR=$$(mktemp -d) ;\
137137
cd $$TMP_DIR ;\
138138
go mod init tmp ;\
139139
echo "Downloading $(2)" ;\
140-
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
140+
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
141141
rm -rf $$TMP_DIR ;\
142142
}
143143
endef

0 commit comments

Comments
 (0)