Files
object-browser/portal-ui/check-warnings.sh
Cesar Celis Hernandez 1871f2bf9e to fail test when yarn does not build (#1388)
* 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>
2022-01-12 16:57:50 -08:00

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