1 | set -e
|
2 |
|
3 | npm run setup
|
4 | npm run lint
|
5 | npm run test
|
6 |
|
7 | if [ "$TRAVIS_BRANCH" != "master" -o -n "$TRAVIS_TAG" -o "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
8 | echo -e "Not sending coverage for a non master branch push - covering without sending."
|
9 | exit 0
|
10 | fi
|
11 |
|
12 | node -e "const [a,b,c]=process.version.split('.');((+a.slice(1)*0x1000)+(+b*0x100)+(+c)>=38912)||process.exit(1)"
|
13 | if [ $? == 0 ]; then
|
14 | echo -e "Generating Coverage for a master branch push - covering and sending."
|
15 | npm run coverage
|
16 | fi
|