UNPKG

729 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 $?
9yarn 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
21yarn test || fail "yarn test finished with return code $?"
22
23yarn -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
29# `yarn pack` doesn't seem to run scripts, however that seems okay here as we
30# just built as part of `install` above.
31yarn pack ||
32 fail "yarn pack finished with return code $?"
33
34yarn gendoc || fail "JSDoc failed with code $?"
35
36exit $RC