mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
7affd5fcff
Attempt both the PR author's branch and the PR's target branch. This resolves issues on experimental where we need riot-web to also be experimental.
25 lines
561 B
Bash
Executable File
25 lines
561 B
Bash
Executable File
#!/bin/sh
|
|
|
|
org="$1"
|
|
repo="$2"
|
|
|
|
rm -r "$repo" || true
|
|
|
|
clone() {
|
|
branch=$1
|
|
if [ -n "$branch" ]
|
|
then
|
|
echo "Trying to use the branch $branch"
|
|
git clone https://github.com/$org/$repo.git $repo --branch "$branch" && exit 0
|
|
fi
|
|
}
|
|
|
|
# Try the PR author's branch in case it exists on the deps as well.
|
|
clone $TRAVIS_PULL_REQUEST_BRANCH
|
|
# Try the target branch of the push or PR.
|
|
clone $TRAVIS_BRANCH
|
|
# Try the current branch from Jenkins.
|
|
clone `"echo $GIT_BRANCH" | sed -e 's/^origin\///'`
|
|
# Use develop as the last resort.
|
|
clone develop
|