laconicd-deprecated/scripts/protocgen.sh
MalteHerrmann f70dafde5a
chore: update proto make commands (#1471)
* Update proto make commands to use cosmos docker image and add notes for possible problems

* Apply make proto-all with new docker container

* Remove stale DOCKER_BUF variable

* Revert to using the tendermintdev/sdk-proto-gen docker image

* remove '@' in proto-lint and proto-check-breaking for consistency with other commands

* Remove unnecessary go get from protocgen.sh (only works after adding --network host to docker run)

* Add --network host to docker run for compatibility on linux

* use cosmos/proto-builder docker image for proto-format because clang-format is not installed on tendermintdev/sdk-proto-gen

* update swagger docs after recent additions to evm.proto in #1413

Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com>
2022-11-20 07:33:58 -05:00

24 lines
735 B
Bash
Executable File

#!/usr/bin/env bash
# --------------
# Commands to run locally
# docker run --network host --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen:v0.7 sh ./protocgen.sh
#
set -eo pipefail
echo "Generating gogo proto code"
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do
if grep go_package $file &>/dev/null; then
buf generate --template proto/buf.gen.gogo.yaml $file
fi
done
done
# TODO: command to generate docs using protoc-gen-doc was deleted here
# move proto files to the right places
cp -r github.com/evmos/ethermint/* ./
rm -rf github.com