Fix installation of gocosmos (#7410)

* Run `make proto-gen` with correct version

* Run with correct gocosmos

* Install gocosmos with go.mod

* Add check go.mod

* Remove comment

* Update contrib/devtools/proto-tools-installer.sh

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Amaury Martiny 2020-10-01 15:25:23 +02:00 committed by GitHub
parent a32e2a03ae
commit 22b47f426e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -85,9 +85,13 @@ f_install_buf() {
f_install_protoc_gen_gocosmos() { f_install_protoc_gen_gocosmos() {
f_print_installing_with_padding protoc-gen-gocosmos f_print_installing_with_padding protoc-gen-gocosmos
pushd "${TEMPDIR}" >/dev/null
if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then
echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder."
return 1
fi
go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null
popd >/dev/null
f_print_done f_print_done
} }