From 7527e75a36131090c5f2f1f7468345f1840fb960 Mon Sep 17 00:00:00 2001 From: Zanicar Date: Wed, 10 May 2023 15:50:30 +0200 Subject: [PATCH 1/2] fix: generate protobuf files under user --- Makefile | 4 +++- scripts/protocgen.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 359beb27..0197325f 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,8 @@ BUF_IMAGE=bufbuild/buf@sha256:9dc5d6645f8f8a2d5aaafc8957fbbb5ea64eada98a84cb0965 DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(BUF_IMAGE) HTTPS_GIT := https://github.com/archway-network/archway.git CURRENT_DIR := $(shell pwd) +USER_ID := $(shell id -u) +GROUP_ID := $(shell id -g) # library versions LIBWASM_VERSION = $(shell go list -m -f '{{ .Version }}' github.com/CosmWasm/wasmvm) @@ -186,7 +188,7 @@ proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(PROTO_BUILDER_IMAGE) sh ./scripts/protocgen.sh + $(DOCKER) run -e "USER_ID=$(USER_ID)" -e "GROUP_ID=$(GROUP_ID)" --rm -v $(CURDIR):/workspace --workdir /workspace $(PROTO_BUILDER_IMAGE) sh ./scripts/protocgen.sh ./scripts/dontcover.sh ./x/tracking ./scripts/dontcover.sh ./x/rewards diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 71a830c0..fe693afe 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -36,3 +36,5 @@ $(find "$(pwd)/proto" -maxdepth 5 -name '*.proto') # move proto files to the right places cp -r github.com/archway-network/archway/* ./ rm -rf github.com + +chown -R $USER_ID:$GROUP_ID ./* From 3c124f249b2c5cadbf2c59736af40c251e8e2be5 Mon Sep 17 00:00:00 2001 From: Zanicar Date: Wed, 10 May 2023 16:45:45 +0200 Subject: [PATCH 2/2] chore: Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 661498b4..a94a949d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -171,6 +171,7 @@ Archway Network - Capture the value you create! - [#368](https://github.com/archway-network/archway/pull/368) - github actions should fetch tags as well for deploy workflow - [#369](https://github.com/archway-network/archway/pull/369) - CODEOWNERS: small set to expand, not large set that filters - [#370](https://github.com/archway-network/archway/pull/370) - login to ghcr +- [#371](https://github.com/archway-network/archway/pull/371) - generated protobuf files belong to USER ### Changed