mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 08:48:05 +00:00
25 lines
481 B
Bash
Executable file
25 lines
481 B
Bash
Executable file
#!/bin/sh
|
|
|
|
echo "Travis Pull Request State: $TRAVIS_PULL_REQUEST"
|
|
echo "Travis Branch: $TRAVIS_BRANCH"
|
|
|
|
git_setup() {
|
|
git config user.email "travis@travis-ci.org"
|
|
git config user.name "Travis CI"
|
|
}
|
|
|
|
detect_branch() {
|
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
|
echo $TRAVIS_BRANCH
|
|
else
|
|
echo $TRAVIS_PULL_REQUEST_BRANCH
|
|
fi
|
|
}
|
|
|
|
CURRENT_BRANCH=$(detect_branch)
|
|
|
|
echo "Detected Branch: $CURRENT_BRANCH"
|
|
|
|
git_setup
|
|
git checkout $CURRENT_BRANCH
|
|
export $CURRENT_BRANCH
|