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>
This commit is contained in:
Cesar Celis Hernandez
2022-01-12 19:57:50 -05:00
committed by GitHub
parent c386040f99
commit 1871f2bf9e

View File

@@ -1,6 +1,19 @@
#!/bin/bash
if yarn build | grep "Compiled with warnings"; then
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