Skip to content

Commit 4f04408

Browse files
CSPL-3964: Adding 'go-tool-install' definition to Makefile.
1 parent 834d41f commit 4f04408

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,16 @@ cleanup-test-e2e:
457457

458458
test-e2e: setup-test-e2e manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.
459459
KIND_CLUSTER=$(KIND_CLUSTER) go test ./test/e2e/ -v -ginkgo.v
460-
$(MAKE) cleanup-test-e2e
460+
$(MAKE) cleanup-test-e2e
461+
462+
define go-install-tool
463+
@[ -f "$(1)-$(3)" ] || { \
464+
set -e; \
465+
package=$(2)@$(3) ;\
466+
echo "Downloading $${package}" ;\
467+
rm -f $(1) || true ;\
468+
GOBIN=$(LOCALBIN) go install $${package} ;\
469+
mv $(1) $(1)-$(3) ;\
470+
} ;\
471+
ln -sf $(1)-$(3) $(1)
472+
endef

0 commit comments

Comments
 (0)