make protobuf build persistent on travis ci

This commit is contained in:
Ding Xiang Fei
2018-06-20 11:28:32 +08:00
committed by Romain Ruetschi
parent 473ea4001c
commit b4ee79f184

View File

@ -1,19 +1,15 @@
#!/usr/bin/bash
set -e
PROTOC_VERSION=$(cat PROTOC_VERSION)
check_protoc_version () {
PROTOC_VERSION=$(cat PROTOC_VERSION)
PROTOC="protoc"
if [ -f $PROTOC ]; then
this_version=`$PROTOC --version`
return `[ "$PROTOC_VERSION" = "$this_version" ]`
else
return 1
fi
this_version=`protoc --version`
return `[ "$PROTOC_VERSION" = "$this_version" ]`
}
if check_protoc_version '3.5.1'; then
echo protoc version 3.5.1 detected.
if check_protoc_version; then
echo $PROTOC_VERSION detected.
exit
fi