Skip to content

Commit 1123a3e

Browse files
Fix: Corrected scenario "go-install-tool" in makefile (#499)
Signed-off-by: Taisuke Okamoto <t.okamoto@idcf.jp>
1 parent 198706f commit 1123a3e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,23 @@ docker-push:
8787
# Download controller-gen locally if necessary
8888
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
8989
controller-gen:
90-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
90+
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
9191

9292
# Download kustomize locally if necessary
9393
KUSTOMIZE = $(shell pwd)/bin/kustomize
9494
kustomize:
95-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
95+
$(call go-install-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
9696

97-
# go-get-tool will 'go get' any package $2 and install it to $1.
97+
# go-install-tool will 'go install' any package $2 and install it to $1.
9898
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
99-
define go-get-tool
99+
define go-install-tool
100100
@[ -f $(1) ] || { \
101101
set -e ;\
102102
TMP_DIR=$$(mktemp -d) ;\
103103
cd $$TMP_DIR ;\
104104
go mod init tmp ;\
105105
echo "Downloading $(2)" ;\
106-
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
106+
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
107107
rm -rf $$TMP_DIR ;\
108108
}
109109
endef

0 commit comments

Comments
 (0)