Skip to content

Commit 111d5ef

Browse files
committed
chore(cosmos): attempt to work around fs perms
1 parent 014da25 commit 111d5ef

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

golang/cosmos/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,16 @@ endif
9393

9494
protoVer=0.15.3
9595
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
96-
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
96+
protoImage=$(DOCKER) run --rm -e HOME=/tmp \
97+
--user=$(shell id -u):$(shell id -g) \
98+
$(shell id -G | xargs -n1 printf -- ' --group-add %s') \
99+
-v $(CURDIR):/workspace:z --workdir /workspace $(protoImageName)
97100

98101
proto-all: proto-format proto-lint proto-gen
99102

103+
proto-sh:
104+
$(protoImage) sh
105+
100106
proto-gen:
101107
@echo "Generating Protobuf files"
102108
@$(protoImage) sh ./scripts/protocgen.sh

golang/cosmos/scripts/protocgen.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh
66

77
set -eo pipefail
8+
touch .permtest
9+
rm -f .permtest
10+
cp -r /home/*/.cache /tmp
811

912
echo "Generating gogo proto code"
1013
cd proto

0 commit comments

Comments
 (0)