From cf22c890c983378926b3e96ea81e7f4d840d57e9 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 1 Sep 2016 17:36:31 -0700 Subject: [PATCH] Adjust PATH in .travis.yml instead of travis.sh. --- .travis.yml | 4 +++- travis.sh | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf62eb0abd..e43855ef97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,9 @@ language: cpp compiler: - gcc - clang -install: ./travis.sh install +install: + - ./travis.sh install + - export PATH=$PATH:$PWD/protoc # used by genfiles_install() script: ./travis.sh script after_success: ./travis.sh after_success after_failure: ./travis.sh after_failure diff --git a/travis.sh b/travis.sh index 694ddc8745..5c099a2c9f 100755 --- a/travis.sh +++ b/travis.sh @@ -75,15 +75,16 @@ genfiles_install() { sudo apt-get install lua5.2 liblua5.2-dev # Need a recent version of protoc to compile proto3 files. + # .travis.yml will add this to our path mkdir protoc cd protoc wget https://github.com/google/protobuf/releases/download/v3.0.0-beta-2/protoc-3.0.0-beta-2-linux-x86_64.zip unzip protoc-3.0.0-beta-2-linux-x86_64.zip - export PATH=`pwd`:$PATH cd .. - protoc --version || true } genfiles_script() { + protoc --version || true + # Avoid regenerating descriptor.pb, since its output can vary based on the # version of protoc. touch upb/descriptor/descriptor.pb