Skip to content

Commit b267bf1

Browse files
committed
Fix
1 parent 4af26f8 commit b267bf1

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

scripts/protoc_installer.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Install protoc
33
PROTOC_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.
67
download_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"

scripts/regenerate.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function finish {
2222
}
2323
trap finish EXIT
2424

25-
export GOBIN="${WORKDIR}"/bin
25+
GOBIN="${WORKDIR}"/bin
2626
export PATH="${GOBIN}:${PATH}"
2727
mkdir -p "${GOBIN}"
2828

@@ -49,7 +49,7 @@ echo "curl https://raw.githubusercontent.com/googleapis/googleapis/master/google
4949
curl --silent https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/code.proto > "${WORKDIR}/googleapis/google/rpc/code.proto"
5050

5151
source ./scripts/protoc_installer.sh
52-
download_protoc $WORKDIR
52+
install_protoc $WORKDIR
5353

5454
mkdir -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).
8786
OPTS=Mgrpc/core/stats.proto=google.golang.org/grpc/interop/grpc_testing/core,\
8887
Mgrpc/testing/benchmark_service.proto=google.golang.org/grpc/interop/grpc_testing,\
8988
Mgrpc/testing/stats.proto=google.golang.org/grpc/interop/grpc_testing,\

scripts/vet-proto.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff 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."

0 commit comments

Comments
 (0)