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:
parent
0894cbc1a9
commit
187a9bf7d5
2 changed files with 12 additions and 0 deletions
9
.travis.fix-fork.sh
Executable file
9
.travis.fix-fork.sh
Executable 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
|
|
@ -3,6 +3,9 @@ language: go
|
|||
install:
|
||||
- sudo apt-get install ninja-build
|
||||
|
||||
before_script:
|
||||
- source .travis.fix-fork.sh
|
||||
|
||||
script:
|
||||
- go test ./...
|
||||
- cp build.ninja.in build.ninja.in.orig
|
||||
|
|
Loading…
Reference in a new issue