* to fail test when yarn does not build * Warnings cleanup (#1389) Signed-off-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> * to fail test when yarn does not build Co-authored-by: cniackz <cniackz@cniackzs-MacBook-Air.local> Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com> Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
20 lines
275 B
Bash
Executable File
20 lines
275 B
Bash
Executable File
#!/bin/bash
|
|
|
|
yell() { echo "$0: $*" >&2; }
|
|
|
|
die() {
|
|
yell "$*"
|
|
cat yarn.log
|
|
exit 111
|
|
}
|
|
|
|
try() { "$@" &> yarn.log || die "cannot $*"; }
|
|
|
|
rm yarn.log
|
|
try yarn build
|
|
|
|
if cat yarn.log | grep "Compiled with warnings"; then
|
|
echo "There are warnings in the code"
|
|
exit 1
|
|
fi
|