grafana/scripts/circle-test-frontend.sh

21 lines
447 B
Bash
Raw Normal View History

2017-10-23 15:06:08 +08:00
#!/bin/bash
function exit_if_fail {
command=$@
echo "Executing '$command'"
eval $command
rc=$?
if [ $rc -ne 0 ]; then
echo "'$command' returned $rc."
exit $rc
fi
}
2019-02-13 18:38:04 +08:00
exit_if_fail npm run prettier:check
2018-09-18 16:47:01 +08:00
exit_if_fail npm run test
2019-03-12 22:08:46 +08:00
# On master also collect some and send some metrics
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "${branch}" == "master" ]; then
exit_if_fail ./scripts/circle-metrics.sh
fi