Skip to content

Commit 1871f2b

Browse files
cniackzcniackzbexsoftBenjamin Perez
authored
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 <[email protected]> Co-authored-by: Benjamin Perez <[email protected]> * to fail test when yarn does not build Co-authored-by: cniackz <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: Benjamin Perez <[email protected]>
1 parent c386040 commit 1871f2b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

portal-ui/check-warnings.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#!/bin/bash
22

3-
if yarn build | grep "Compiled with warnings"; then
3+
yell() { echo "$0: $*" >&2; }
4+
5+
die() {
6+
yell "$*"
7+
cat yarn.log
8+
exit 111
9+
}
10+
11+
try() { "$@" &> yarn.log || die "cannot $*"; }
12+
13+
rm yarn.log
14+
try yarn build
15+
16+
if cat yarn.log | grep "Compiled with warnings"; then
417
echo "There are warnings in the code"
518
exit 1
619
fi

0 commit comments

Comments
 (0)