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 set PROTOBUF_VER=21.7
@rem Workaround https://github.com/protocolbuffers/protobuf/issues/10172
set PROTOBUF_VER_ISSUE_10172=3.%PROTOBUF_VER%
set CMAKE_NAME=cmake-3.3.2-win32-x86 set CMAKE_NAME=cmake-3.3.2-win32-x86
if not exist "protobuf-%PROTOBUF_VER%\build\Release\" ( 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'; & { [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 powershell -command "$ErrorActionPreference = 'stop'; & { Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory('protobuf.zip', '.') }" || exit /b 1
del protobuf.zip del protobuf.zip
rename protobuf-%PROTOBUF_VER_ISSUE_10172% protobuf-%PROTOBUF_VER%
mkdir protobuf-%PROTOBUF_VER%\build mkdir protobuf-%PROTOBUF_VER%\build
pushd protobuf-%PROTOBUF_VER%\build pushd protobuf-%PROTOBUF_VER%\build

View File

@ -3,9 +3,7 @@
# Build protoc # Build protoc
set -evux -o pipefail set -evux -o pipefail
PROTOBUF_VERSION=21.1 PROTOBUF_VERSION=21.7
# https://github.com/protocolbuffers/protobuf/issues/10172
PROTOBUF_VERSION_ISSUE_10172=3.$PROTOBUF_VERSION
# ARCH is x86_64 bit unless otherwise specified. # ARCH is x86_64 bit unless otherwise specified.
ARCH="${ARCH:-x86_64}" ARCH="${ARCH:-x86_64}"
@ -30,7 +28,6 @@ if [ -f ${INSTALL_DIR}/bin/protoc ]; then
else else
if [[ ! -d "$DOWNLOAD_DIR"/protobuf-"${PROTOBUF_VERSION}" ]]; then 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 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 fi
pushd $DOWNLOAD_DIR/protobuf-${PROTOBUF_VERSION} pushd $DOWNLOAD_DIR/protobuf-${PROTOBUF_VERSION}
# install here so we don't need sudo # install here so we don't need sudo