forked from mirrors/thatmattlove-hyperglass
simplified script; switched to TRAVIS_BRANCH env variable
This commit is contained in:
parent
be95acc98c
commit
dd084f5890
1 changed files with 3 additions and 18 deletions
|
|
@ -1,22 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
THIS_BRANCH=0
|
||||
|
||||
git_setup() {
|
||||
git config --global user.email "travis@travis-ci.org"
|
||||
git config --global user.name "Travis CI"
|
||||
}
|
||||
|
||||
set_branch() {
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then
|
||||
THIS_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
|
||||
else
|
||||
THIS_BRANCH='master'
|
||||
fi
|
||||
}
|
||||
|
||||
git_setup
|
||||
git config --global user.email "travis@travis-ci.org"
|
||||
git config --global user.name "Travis CI"
|
||||
git fetch
|
||||
set_branch
|
||||
git checkout $THIS_BRANCH
|
||||
git checkout $TRAVIS_BRANCH
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue