mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 08:48:05 +00:00
Set git to fetch remote branch
This commit is contained in:
parent
127489f5b8
commit
d4ebb07b19
1 changed files with 7 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Travis Pull Request State: $TRAVIS_PULL_REQUEST"
|
||||
echo "Travis Pull Request: $TRAVIS_PULL_REQUEST"
|
||||
echo "Travis Branch: $TRAVIS_BRANCH"
|
||||
|
||||
git_setup() {
|
||||
|
|
@ -17,9 +17,13 @@ detect_branch() {
|
|||
}
|
||||
|
||||
export CURRENT_BRANCH=$(detect_branch)
|
||||
|
||||
echo "Detected Branch: $CURRENT_BRANCH"
|
||||
|
||||
echo "Setting git config parameters..."
|
||||
git_setup
|
||||
git fetch origin
|
||||
echo "Initiating git fetch..."
|
||||
git fetch --depth=1 git@github.com:$TRAVIS_PULL_REQUEST_SLUG.git refs/heads/$CURRENT_BRANCH:refs/remotes/origin/$CURRENT_BRANCH
|
||||
echo "Running git checkout..."
|
||||
git checkout origin/$CURRENT_BRANCH
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue