Skip to content

Commit

Permalink
chore: Use Go cache for helm-docs installation (#44)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergiy Kulanov <[email protected]>
  • Loading branch information
SergK committed Apr 27, 2024
1 parent ba1851a commit 0251183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ controller-gen: ## Download controller-gen locally if necessary.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-get-tool
@[ -f $(1) ] || { \
set -e ;\
set -ex ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
go get -d $(2)@$(3) ;\
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
GOCACHE=$$GOCACHE GOMODCACHE=$$GOMODCACHE go get -d $(2)@$(3) ;\
GOBIN=$(PROJECT_DIR)/bin GOCACHE=$$GOCACHE GOMODCACHE=$$GOMODCACHE go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
Expand Down

0 comments on commit 0251183

Please sign in to comment.