Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 320567d

Browse files
committed
Add protoc install
1 parent 3a885ad commit 320567d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
sudo: required
2+
dist: trusty
3+
14
language: go
25

36
matrix:
47
include:
58
- go: 1.6
69

10+
install:
11+
- sudo apt-get update -qq
12+
- hack/install-protoc.sh
13+
714
script:
815
- cd ${TRAVIS_BUILD_DIR}
916
- hack/verify-gofmt.sh
1017
- hack/verify-generated-proto.sh
1118
- make
19+

hack/install-protoc.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
which yum>/dev/null
3+
if [[ $? != 0 ]]; then
4+
sudo apt-get install -y unzip
5+
else
6+
sudo yum install -y unzip
7+
fi
8+
9+
10+
# Install protoc
11+
cd /tmp
12+
curl -sSL https://github.com/google/protobuf/releases/download/v3.0.0-beta-3/protoc-3.0.0-beta-3-linux-x86_64.zip -o protoc-3.0.0-beta-3-linux-x86_64.zip
13+
unzip protoc-3.0.0-beta-3-linux-x86_64.zip
14+
sudo mv protoc /usr/bin/protoc
15+
16+
echo "protoc installed success."

0 commit comments

Comments
 (0)