Skip to content

Commit 231bbb9

Browse files
authored
Merge pull request #287 from turkenf/add-cachedirs
Add go.mod.cachedir to Makefile
2 parents 48dc2f8 + 6801d59 commit 231bbb9

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

Makefile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,6 @@ submodules:
112112
@git submodule sync
113113
@git submodule update --init --recursive
114114

115-
# NOTE(hasheddan): the build submodule currently overrides XDG_CACHE_HOME in
116-
# order to force the Helm 3 to use the .work/helm directory. This causes Go on
117-
# Linux machines to use that directory as the build cache as well. We should
118-
# adjust this behavior in the build submodule because it is also causing Linux
119-
# users to duplicate their build cache, but for now we just make it easier to
120-
# identify its location in CI so that we cache between builds.
121-
go.cachedir:
122-
@go env GOCACHE
123-
124115
# We must ensure up is installed in tool cache prior to build as including the
125116
# k8s_tools machinery prior to the xpkg machinery sets UP to point to tool cache.
126117
build.init: $(UP)
@@ -136,4 +127,16 @@ run: $(KUBECTL) generate
136127
manifests:
137128
@$(INFO) Deprecated. Run make generate instead.
138129

139-
.PHONY: cobertura submodules fallthrough test-integration run manifests
130+
# NOTE(hasheddan): the build submodule currently overrides XDG_CACHE_HOME in
131+
# order to force the Helm 3 to use the .work/helm directory. This causes Go on
132+
# Linux machines to use that directory as the build cache as well. We should
133+
# adjust this behavior in the build submodule because it is also causing Linux
134+
# users to duplicate their build cache, but for now we just make it easier to
135+
# identify its location in CI so that we cache between builds.
136+
go.cachedir:
137+
@go env GOCACHE
138+
139+
go.mod.cachedir:
140+
@go env GOMODCACHE
141+
142+
.PHONY: cobertura submodules fallthrough test-integration run manifests go.cachedir go.mod.cachedir

0 commit comments

Comments
 (0)