Skip to content

Commit

Permalink
Use Protobuf 21.7 in our code generator
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ejona86 committed Oct 10, 2022
1 parent d211b54 commit ce5f789
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions buildscripts/make_dependencies.bat
@@ -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\" (
Expand All @@ -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

Expand Down
5 changes: 1 addition & 4 deletions buildscripts/make_dependencies.sh
Expand Up @@ -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}"
Expand All @@ -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
Expand Down

0 comments on commit ce5f789

Please sign in to comment.