Fix .travis.yml for external repositories

This commit is contained in:
Hajime Hoshi 2020-03-23 11:22:37 +09:00
parent e7eab6a8f3
commit c5a7d5d6a9

View File

@ -36,12 +36,11 @@ install:
- mkdir /tmp/work
- cd /tmp/work
- go mod init example.com/m
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then go get github.com/hajimehoshi/ebiten@$TRAVIS_COMMIT; fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then go get github.com/hajimehoshi/ebiten; fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then wget -O ebiten.zip https://github.com/hajimehoshi/ebiten/archive/$TRAVIS_COMMIT.zip; fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then unzip ebiten.zip; fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then mv ./ebiten-$TRAVIS_COMMIT ebiten; fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then go mod edit -replace=github.com/hajimehoshi/ebiten=./ebiten; fi
- go get github.com/hajimehoshi/ebiten
- wget -O ebiten.zip https://github.com/$TRAVIS_REPO_SLUG/archive/$TRAVIS_COMMIT.zip
- unzip ebiten.zip
- mv ./ebiten-$TRAVIS_COMMIT ebiten
- go mod edit -replace=github.com/hajimehoshi/ebiten=./ebiten
# wasmbrowsertest
- GO111MODULE=off go get github.com/agnivade/wasmbrowsertest
@ -51,8 +50,7 @@ install:
- GO111MODULE=off go1.12.16 get github.com/gopherjs/gopherjs
- mkdir -p $GOPATH/src/github.com/hajimehoshi
- cd $GOPATH/src/github.com/hajimehoshi
- wget -O ebiten.zip https://github.com/hajimehoshi/ebiten/archive/$TRAVIS_COMMIT.zip
- unzip ebiten.zip
- unzip /tmp/work/ebiten.zip
- mv ./ebiten-$TRAVIS_COMMIT ebiten
- cd ./ebiten
- GO111MODULE=off go get -d -tags=example ./...