You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Most `npm` operations are replaced with `yarn`, which generally has better behavior. However, steps like publish that write to the NPM registry are left to `npm`, which currently handles these tasks best.
37 lines
729 B
Bash
Executable File
37 lines
729 B
Bash
Executable File
#!/bin/bash -l
|
|
|
|
set -x
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
|
|
|
nvm use 10 || exit $?
|
|
yarn install || exit $?
|
|
|
|
RC=0
|
|
|
|
function fail {
|
|
echo $@ >&2
|
|
RC=1
|
|
}
|
|
|
|
# don't use last time's test reports
|
|
rm -rf reports coverage || exit $?
|
|
|
|
yarn test || fail "yarn test finished with return code $?"
|
|
|
|
yarn -s lint -f checkstyle > eslint.xml ||
|
|
fail "eslint finished with return code $?"
|
|
|
|
# delete the old tarball, if it exists
|
|
rm -f matrix-js-sdk-*.tgz
|
|
|
|
# `yarn pack` doesn't seem to run scripts, however that seems okay here as we
|
|
# just built as part of `install` above.
|
|
yarn pack ||
|
|
fail "yarn pack finished with return code $?"
|
|
|
|
yarn gendoc || fail "JSDoc failed with code $?"
|
|
|
|
exit $RC
|