build.sh improvements

- run `go test ./...` and STOP on error
- run `go build` and STOP on error
- run `go install` and STOP on error
This commit is contained in:
Travis McLane 2020-03-28 10:34:27 -05:00 committed by Lea Anthony
commit 773bad45f6
2 changed files with 23 additions and 9 deletions

View file

@ -1,7 +0,0 @@
FROM techknowlogick/xgo:go-1.14.x
RUN \
apt-get update && \
apt-get install -y --no-install-recommends libwebkit2gtk-4.0=* libgtk-3.0=* && \
rm -rf /var/lib/apt/lists/*

View file

@ -15,9 +15,30 @@ cd lib/renderer
mewn
cd ../..
echo "**** Installing Wails locally ****"
echo "**** Checking if Wails passes unit tests ****"
if ! go test ./...
then
echo ""
echo "ERROR: Unit tests failed!"
exit 1;
fi
cd cmd/wails
go install
echo "**** Checking if Wails compiles ****"
if ! go build .
then
echo ""
echo "ERROR: Build failed!"
exit 1;
fi
echo "**** Installing Wails locally ****"
if ! go install
then
echo ""
echo "ERROR: Install failed!"
exit 1;
fi
cd ../..
echo "**** Tidying the mods! ****"