Fix running travis on forked repos

If we're not on the official repo, link the directory structure around
so that go can still find the code.
This commit is contained in:
Dan Willemsen 2015-07-23 18:19:18 -07:00
parent 0894cbc1a9
commit 187a9bf7d5
2 changed files with 12 additions and 0 deletions

9
.travis.fix-fork.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
if echo $TRAVIS_BUILD_DIR | grep -vq "github.com/google/blueprint$" ; then
cd ../..
mkdir -p google
mv $TRAVIS_BUILD_DIR google/blueprint
cd google/blueprint
export TRAVIS_BUILD_DIR=$PWD
fi

View file

@ -3,6 +3,9 @@ language: go
install: install:
- sudo apt-get install ninja-build - sudo apt-get install ninja-build
before_script:
- source .travis.fix-fork.sh
script: script:
- go test ./... - go test ./...
- cp build.ninja.in build.ninja.in.orig - cp build.ninja.in build.ninja.in.orig