Skip to content

Commit

Permalink
just install the thing
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanHoogland committed Apr 22, 2024
1 parent 9ebea3b commit 34549b8
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,4 @@ test:

MOCKGEN := mockgen
mockgen: ## Download conversion-gen locally if necessary.
$(call go-get-tool,$(MOCKGEN),github.com/golang/mock/mockgen)

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-get-tool
[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
go get github.com/golang/mock/mockgen; go install github.com/golang/mock/mockgen;

0 comments on commit 34549b8

Please sign in to comment.