Files
platform-external-webrtc/third_party/protobuf/csharp/build_tools.sh
Artem Titov 739351d476 Roll chromium_revision 95336cb92b..191d55580e (557816:557824)
Change log: 95336cb92b..191d55580e
Full diff: 95336cb92b..191d55580e

Roll chromium third_party 4e16929f46..3a8f2a9e1e
Change log: 4e16929f46..3a8f2a9e1e

Changed dependencies:
* src/tools: c44a3f5eca..f524a53b81
DEPS diff: 95336cb92b..191d55580e/DEPS

No update to Clang.

TBR=titovartem@google.com,
BUG=None
CQ_INCLUDE_TRYBOTS=master.internal.tryserver.corp.webrtc:linux_internal

Change-Id: Ic9c4a62b050383646e9fcf5cc07a5653c14ac06e
Reviewed-on: https://webrtc-review.googlesource.com/76120
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23205}
2018-05-11 11:17:05 +00:00

53 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
if [ $# -ne 1 ]; then
cat <<EOF
Usage: $0 <VERSION_NUMBER>
Example:
$ $0 3.0.0
This script will download pre-built protoc binaries from maven repository and
create the Google.Protobuf.Tools package. Well-known type .proto files will also
be included.
EOF
exit 1
fi
VERSION_NUMBER=$1
# <directory name> <binary file name> pairs.
declare -a FILE_NAMES=( \
windows_x86 windows-x86_32.exe \
windows_x64 windows-x86_64.exe \
macosx_x86 osx-x86_32.exe \
macosx_x64 osx-x86_64.exe \
linux_x86 linux-x86_32.exe \
linux_x64 linux-x86_64.exe \
)
set -e
mkdir -p protoc
# Create a zip file for each binary.
for((i=0;i<${#FILE_NAMES[@]};i+=2));do
DIR_NAME=${FILE_NAMES[$i]}
mkdir -p protoc/$DIR_NAME
if [ ${DIR_NAME:0:3} = "win" ]; then
TARGET_BINARY="protoc.exe"
else
TARGET_BINARY="protoc"
fi
BINARY_NAME=${FILE_NAMES[$(($i+1))]}
BINARY_URL=http://repo1.maven.org/maven2/com/google/protobuf/protoc/${VERSION_NUMBER}/protoc-${VERSION_NUMBER}-${BINARY_NAME}
if ! wget ${BINARY_URL} -O protoc/$DIR_NAME/$TARGET_BINARY &> /dev/null; then
echo "[ERROR] Failed to download ${BINARY_URL}" >&2
echo "[ERROR] Skipped $protoc-${VERSION_NAME}-${DIR_NAME}" >&2
continue
fi
done
nuget pack Google.Protobuf.Tools.nuspec