File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 22# Install protoc
33PROTOC_VERSION=" 25.2"
44
5- # Function to download pre-built binaries for Linux
5+ # Function to download pre-built binaries for Linux with
6+ # ARCH as $1, OS as $2, and WORKDIR as $3 arguments.
67download_binary () {
78 # Download URL (adjust if a newer release is available)
89 DOWNLOAD_URL=" https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION} /protoc-${PROTOC_VERSION} -$2 -$1 .zip"
@@ -13,7 +14,8 @@ download_binary() {
1314 rm " protoc-${PROTOC_VERSION} -$2 -$1 .zip"
1415}
1516
16- download_protoc () {
17+ # Function to install protoc with WORKDIR as argument
18+ install_protoc () {
1719 # Determine architecture
1820 if [[ $( uname -m) == " x86_64" ]]; then
1921 ARCH=" x86_64"
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function finish {
2222}
2323trap finish EXIT
2424
25- export GOBIN=" ${WORKDIR} " /bin
25+ GOBIN=" ${WORKDIR} " /bin
2626export PATH=" ${GOBIN} :${PATH} "
2727mkdir -p " ${GOBIN} "
2828
@@ -49,7 +49,7 @@ echo "curl https://raw.githubusercontent.com/googleapis/googleapis/master/google
4949curl --silent https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/code.proto > " ${WORKDIR} /googleapis/google/rpc/code.proto"
5050
5151source ./scripts/protoc_installer.sh
52- download_protoc $WORKDIR
52+ install_protoc $WORKDIR
5353
5454mkdir -p " ${WORKDIR} /out"
5555
@@ -83,7 +83,6 @@ SOURCES=(
8383# Note that the protos listed here are all for testing purposes. All protos to
8484# be used externally should have a go_package option (and they don't need to be
8585# listed here).
86- # listed here).
8786OPTS=Mgrpc/core/stats.proto=google.golang.org/grpc/interop/grpc_testing/core,\
8887Mgrpc/testing/benchmark_service.proto=google.golang.org/grpc/interop/grpc_testing,\
8988Mgrpc/testing/stats.proto=google.golang.org/grpc/interop/grpc_testing,\
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ if [[ "$1" = "-install" ]]; then
2828 unzip ${PROTOC_FILENAME}
2929 protoc --version # Check that the binary works.
3030 popd
31- elif [[ -z " ${VET_SKIP_PROTO} " ]]; then
32- source ./scripts/protoc_installer.sh
33- download_protoc
34- protoc --version
3531 else
3632 # TODO: replace with install protoc when https://github.com/grpc/grpc-go/pull/7064 is merged.
3733 die " -install currently intended for use in CI only."
You can’t perform that action at this time.
0 commit comments