Skip to content

Commit 042d66c

Browse files
committed
Mount host dir for go build cache in release
1 parent 872567f commit 042d66c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,13 @@ docker-run-release: export pkg=/go/src/github.com/databus23/helm-diff
5151
docker-run-release:
5252
git checkout master
5353
git push
54+
# needed to avoid "failed to initialize build cache at /.cache/go-build: mkdir /.cache: permission denied"
55+
mkdir -p docker-run-release-cache
5456
# uid needs to be set to avoid "error obtaining VCS status: exit status 128"
55-
docker run --user $(shell id -u) -it --rm -e GITHUB_TOKEN -v $(shell pwd):$(pkg) -w $(pkg) golang:1.19.8 make bootstrap release
57+
docker run --user $(shell id -u) -it --rm -e GITHUB_TOKEN \
58+
-v $(shell pwd):$(pkg) \
59+
-v $(shell pwd)/docker-run-release-cache:/.cache \
60+
-w $(pkg) golang:1.19.8 make bootstrap release
5661

5762
.PHONY: dist
5863
dist: export COPYFILE_DISABLE=1 #teach OSX tar to not put ._* files in tar archive

0 commit comments

Comments
 (0)