1 | #! /bin/bash
|
2 |
|
3 | wire() {
|
4 | echo "Attempting to install $1@$2";
|
5 |
|
6 | npm install "$1@bpmn-io/$1#$2";
|
7 |
|
8 | if [ $? -ne 0 ]; then
|
9 | echo "Falling back to $1@master";
|
10 |
|
11 | npm install "$1@bpmn-io/$1#master";
|
12 | fi
|
13 | }
|
14 |
|
15 | FEATURE_BRANCH=
|
16 |
|
17 | if [ "$TRAVIS_TAG" == "" ]; then
|
18 | if [ "$TRAVIS_PULL_REQUEST_BRANCH" != "" ]; then
|
19 | FEATURE_BRANCH="$TRAVIS_PULL_REQUEST_BRANCH";
|
20 | else
|
21 | FEATURE_BRANCH="$TRAVIS_BRANCH";
|
22 | fi
|
23 |
|
24 | wire "diagram-js" "$FEATURE_BRANCH";
|
25 | wire "bpmn-js" "$FEATURE_BRANCH";
|
26 |
|
27 | fi |
\ | No newline at end of file |