Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generate protobuf files under user #371

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./*
Loading