Use Protobuf 21.7 in our code generator

This aligns the C++ version we're using for gRPC-generated code with the
Java version. This should have no real impact to our users, as there
were no features added to .proto files or the like that would be visible
to users.
This commit is contained in:
Eric Anderson 2022-10-04 10:22:52 -07:00 committed by GitHub
parent b7363bc854
commit b118e00cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View File

@ -1,6 +1,4 @@
set PROTOBUF_VER=21.1
@rem Workaround https://github.com/protocolbuffers/protobuf/issues/10172
set PROTOBUF_VER_ISSUE_10172=3.%PROTOBUF_VER%
set PROTOBUF_VER=21.7
set CMAKE_NAME=cmake-3.3.2-win32-x86
if not exist "protobuf-%PROTOBUF_VER%\build\Release\" (
@ -25,7 +23,6 @@ set PATH=%PATH%;%cd%\%CMAKE_NAME%\bin
powershell -command "$ErrorActionPreference = 'stop'; & { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; iwr https://github.com/google/protobuf/archive/v%PROTOBUF_VER%.zip -OutFile protobuf.zip }" || exit /b 1
powershell -command "$ErrorActionPreference = 'stop'; & { Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory('protobuf.zip', '.') }" || exit /b 1
del protobuf.zip
rename protobuf-%PROTOBUF_VER_ISSUE_10172% protobuf-%PROTOBUF_VER%
mkdir protobuf-%PROTOBUF_VER%\build
pushd protobuf-%PROTOBUF_VER%\build

View File

@ -3,9 +3,7 @@
# Build protoc
set -evux -o pipefail
PROTOBUF_VERSION=21.1
# https://github.com/protocolbuffers/protobuf/issues/10172
PROTOBUF_VERSION_ISSUE_10172=3.$PROTOBUF_VERSION
PROTOBUF_VERSION=21.7
# ARCH is x86_64 bit unless otherwise specified.
ARCH="${ARCH:-x86_64}"
@ -30,7 +28,6 @@ if [ -f ${INSTALL_DIR}/bin/protoc ]; then
else
if [[ ! -d "$DOWNLOAD_DIR"/protobuf-"${PROTOBUF_VERSION}" ]]; then
curl -Ls https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-all-${PROTOBUF_VERSION}.tar.gz | tar xz -C $DOWNLOAD_DIR
mv "$DOWNLOAD_DIR/protobuf-${PROTOBUF_VERSION_ISSUE_10172}" "$DOWNLOAD_DIR/protobuf-${PROTOBUF_VERSION}"
fi
pushd $DOWNLOAD_DIR/protobuf-${PROTOBUF_VERSION}
# install here so we don't need sudo