Skip to content

Commit

Permalink
Mount host dir for go build cache in release
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed May 16, 2023
1 parent 872567f commit 042d66c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ docker-run-release: export pkg=/go/src/github.com/databus23/helm-diff
docker-run-release:
git checkout master
git push
# needed to avoid "failed to initialize build cache at /.cache/go-build: mkdir /.cache: permission denied"
mkdir -p docker-run-release-cache
# uid needs to be set to avoid "error obtaining VCS status: exit status 128"
docker run --user $(shell id -u) -it --rm -e GITHUB_TOKEN -v $(shell pwd):$(pkg) -w $(pkg) golang:1.19.8 make bootstrap release
docker run --user $(shell id -u) -it --rm -e GITHUB_TOKEN \
-v $(shell pwd):$(pkg) \
-v $(shell pwd)/docker-run-release-cache:/.cache \
-w $(pkg) golang:1.19.8 make bootstrap release

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

0 comments on commit 042d66c

Please sign in to comment.