Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pingcap/kvproto into m/ba…
Browse files Browse the repository at this point in the history
…ckup-raw-kv
  • Loading branch information
MyonKeminta committed Dec 11, 2019
2 parents 4a7e8fa + e499bad commit 937f628
Show file tree
Hide file tree
Showing 24 changed files with 808 additions and 766 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
docker:
- image: circleci/golang:stretch
environment:
PROTOC_VERSION: "3.1.0"
PROTOC_VERSION: "3.8.0"
working_directory: /go/src/github.com/pingcap/kvproto
steps:
- checkout
Expand All @@ -28,7 +28,7 @@ jobs:
RUST_TEST_THREADS: "1"
RUST_BACKTRACE: "1"
RUSTFLAGS: "-Dwarnings"
PROTOC_VERSION: "3.1.0"
PROTOC_VERSION: "3.8.0"
CPLUS_INCLUDE_PATH: "/usr/lib/gcc/x86_64-linux-gnu/6/include"
steps:
- checkout
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Protocol buffer files for TiKV

* Rust
* Go
* Protoc 3.1.0
* Protoc 3.8.0
* This repo correctly placed in your `$GOPATH`.

# Usage
Expand All @@ -22,7 +22,7 @@ Protocol buffer files for TiKV
If you need to override your version of `protoc` because you have a later version you can install the correct version like so:

```bash
PROTOC_VERSION=3.1.0
PROTOC_VERSION=3.8.0
curl -L https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-linux-x86_64.zip -o protoc.zip &&\
unzip protoc.zip -d protoc &&\
rm protoc.zip
Expand Down
7 changes: 2 additions & 5 deletions generate_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ check_protoc_version() {
version=$(protoc --version)
major=$(echo ${version} | sed -n -e 's/.*\([0-9]\{1,\}\)\.[0-9]\{1,\}\.[0-9]\{1,\}.*/\1/p')
minor=$(echo ${version} | sed -n -e 's/.*[0-9]\{1,\}\.\([0-9]\{1,\}\)\.[0-9]\{1,\}.*/\1/p')
if [ "$major" -gt 3 ]; then
if [ "$major" -eq 3 ] && [ "$minor" -eq 8 ]; then
return 0
fi
if [ "$major" -eq 3 ] && [ "$minor" -ge 1 ]; then
return 0
fi
echo "protoc version not match, version 3.1.x is needed, current version: ${version}"
echo "protoc version not match, version 3.8.x is needed, current version: ${version}"
return 1
}

Expand Down
7 changes: 2 additions & 5 deletions generate_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ check_protoc_version() {
version=$(protoc --version)
major=$(echo ${version} | sed -n -e 's/.*\([0-9]\{1,\}\)\.[0-9]\{1,\}\.[0-9]\{1,\}.*/\1/p')
minor=$(echo ${version} | sed -n -e 's/.*[0-9]\{1,\}\.\([0-9]\{1,\}\)\.[0-9]\{1,\}.*/\1/p')
if [ "$major" -gt 3 ]; then
if [ "$major" -eq 3 ] && [ "$minor" -eq 8 ]; then
return 0
fi
if [ "$major" -eq 3 ] && [ "$minor" -ge 1 ]; then
return 0
fi
echo "protoc version not match, version 3.1.x is needed, current version: ${version}"
echo "protoc version not match, version 3.8.x is needed, current version: ${version}"
return 1
}

Expand Down
Loading

0 comments on commit 937f628

Please sign in to comment.