1 |
|
2 |
|
3 | set -x
|
4 |
|
5 | export NVM_DIR="$HOME/.nvm"
|
6 | [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
7 |
|
8 | nvm use 10 || exit $?
|
9 | yarn install || exit $?
|
10 |
|
11 | RC=0
|
12 |
|
13 | function fail {
|
14 | echo $@ >&2
|
15 | RC=1
|
16 | }
|
17 |
|
18 |
|
19 | rm -rf reports coverage || exit $?
|
20 |
|
21 | yarn test || fail "yarn test finished with return code $?"
|
22 |
|
23 | yarn -s lint -f checkstyle > eslint.xml ||
|
24 | fail "eslint finished with return code $?"
|
25 |
|
26 |
|
27 | rm -f matrix-js-sdk-*.tgz
|
28 |
|
29 |
|
30 |
|
31 | yarn pack ||
|
32 | fail "yarn pack finished with return code $?"
|
33 |
|
34 | yarn gendoc || fail "JSDoc failed with code $?"
|
35 |
|
36 | exit $RC
|