chore(project): do not link upstream PRs against master

This commit is contained in:
Nico Rehwaldt 2019-11-19 15:06:18 +01:00 committed by fake-join[bot]
parent ec13d8e7b8
commit e4711a5810
1 changed files with 16 additions and 12 deletions

View File

@ -2,20 +2,24 @@
FEATURE_BRANCH=
if [ "$TRAVIS_TAG" == "" ]; then
if [ "$TRAVIS_PULL_REQUEST_BRANCH" != "" ]; then
FEATURE_BRANCH="$TRAVIS_PULL_REQUEST_BRANCH";
else
FEATURE_BRANCH="$TRAVIS_BRANCH";
fi
# https://docs.travis-ci.com/user/environment-variables
echo "Attempting to install diagram-js@$FEATURE_BRANCH";
if [ "$TRAVIS_TAG" <> "" ] || [ "$TRAVIS_BRANCH" == "master" ]; then
exit 0;
fi
npm install "diagram-js@bpmn-io/diagram-js#$FEATURE_BRANCH";
if [ "$TRAVIS_PULL_REQUEST_BRANCH" != "" ]; then
FEATURE_BRANCH="$TRAVIS_PULL_REQUEST_BRANCH";
else
FEATURE_BRANCH="$TRAVIS_BRANCH";
fi
if [ $? -ne 0 ]; then
echo "Falling back to diagram-js@develop";
echo "Attempting to install diagram-js@$FEATURE_BRANCH";
npm install "diagram-js@bpmn-io/diagram-js#develop";
fi
npm install "diagram-js@bpmn-io/diagram-js#$FEATURE_BRANCH";
if [ $? -ne 0 ]; then
echo "Falling back to diagram-js@develop";
npm install "diagram-js@bpmn-io/diagram-js#develop";
fi