Skip to content

Commit 5f89a8b

Browse files
authored
Merge pull request #8523 from guggero/linter-use-cache
make: use Golang build and module cache for linter
2 parents 6cef367 + 834371c commit 5f89a8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ ifneq ($(workers),)
6363
LINT_WORKERS = --concurrency=$(workers)
6464
endif
6565

66-
DOCKER_TOOLS = docker run --rm -v $$(pwd):/build lnd-tools
66+
DOCKER_TOOLS = docker run \
67+
--rm \
68+
-v $(shell bash -c "go env GOCACHE || (mkdir -p /tmp/go-cache; echo /tmp/go-cache)"):/tmp/build/.cache \
69+
-v $(shell bash -c "go env GOMODCACHE || (mkdir -p /tmp/go-modcache; echo /tmp/go-modcache)"):/tmp/build/.modcache \
70+
-v $$(pwd):/build lnd-tools
6771

6872
GREEN := "\\033[0;32m"
6973
NC := "\\033[0m"

0 commit comments

Comments
 (0)