mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 15:46:43 +00:00
* Protobuf tooling fix and upgrade * Paths for protobuf files has changed, reflect that in Makefile * Fix the tooling to make it work in macos * Update protoc version and regenarate files. * Regen proto
25 lines
746 B
Bash
Executable file
25 lines
746 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Install protobuf
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
os="linux"
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
os="osx"
|
|
else
|
|
echo "Unsupported platform"
|
|
exit 1
|
|
fi
|
|
|
|
PROTOC_ZIP=protoc-3.19.3-$os-x86_64.zip
|
|
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.3/$PROTOC_ZIP
|
|
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
|
|
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
|
|
rm -f $PROTOC_ZIP
|
|
|
|
# Change permissions to use the binary
|
|
sudo chmod -R 755 /usr/local/bin/protoc
|
|
sudo chmod -R 755 /usr/local/include
|
|
|
|
# Install golang extensions (DO NOT CHANGE THE VERSIONS)
|
|
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.25.0
|
|
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1
|