mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 14:44:58 +08:00
23 lines
509 B
Bash
Executable File
23 lines
509 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
org="$1"
|
|
repo="$2"
|
|
|
|
rm -r "$repo" || true
|
|
|
|
curbranch="$TRAVIS_PULL_REQUEST_BRANCH"
|
|
[ -z "$curbranch" ] && curbranch="$TRAVIS_BRANCH"
|
|
[ -z "$curbranch" ] && curbranch=`"echo $GIT_BRANCH" | sed -e 's/^origin\///'` # jenkins
|
|
|
|
if [ -n "$curbranch" ]
|
|
then
|
|
echo "Determined branch to be $curbranch"
|
|
|
|
git clone https://github.com/$org/$repo.git $repo --branch "$curbranch" && exit 0
|
|
fi
|
|
|
|
echo "Checking out develop branch"
|
|
git clone https://github.com/$org/$repo.git $repo --branch develop
|