UNPKG

614 Bapplication/x-shView Raw
1#!/bin/bash -l
2
3set -x
4
5export NVM_DIR="$HOME/.nvm"
6[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
7
8nvm use 10 || exit $?
9npm install || exit $?
10
11RC=0
12
13function fail {
14 echo $@ >&2
15 RC=1
16}
17
18# don't use last time's test reports
19rm -rf reports coverage || exit $?
20
21npm test || fail "npm test finished with return code $?"
22
23npm run -s lint -- -f checkstyle > eslint.xml ||
24 fail "eslint finished with return code $?"
25
26# delete the old tarball, if it exists
27rm -f matrix-js-sdk-*.tgz
28
29npm pack ||
30 fail "npm pack finished with return code $?"
31
32npm run gendoc || fail "JSDoc failed with code $?"
33
34exit $RC