Skip to content

Commit

Permalink
Update install workflow to support Go v1.18 (#134)
Browse files Browse the repository at this point in the history
Command 'go get' can no longer be used to build packages starting Go v1.18 (https://go.dev/doc/go-get-install-deprecation). Kustomize version also needs to be updated to v4.5 since go install doesn't support exclude directives (kubernetes-sigs/kustomize#3618). The change has been tested on both Go v1.17 and Go v1.18 to ensure the Makefile works properly.
  • Loading branch information
ivyostosh committed Apr 27, 2022
1 parent 4f7eb25 commit 53532ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ kubetest2: ## Download kubetest2 locally if necessary.

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.2)

MOCKGEN = $(shell pwd)/bin/mockgen
mockgen: ## Download mockgen locally if necessary.
Expand All @@ -153,7 +153,7 @@ TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
$(GO) mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin $(GO) get $(2) ;\
GOBIN=$(PROJECT_DIR)/bin $(GO) install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
Expand Down

0 comments on commit 53532ad

Please sign in to comment.