2019-10-08 06:12:08 +11:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2020-04-04 13:08:20 -05:00
|
|
|
echo "**** Checking if Wails passes unit tests ****"
|
2021-03-27 21:06:02 +11:00
|
|
|
if ! go test ./lib/... ./runtime/... ./cmd/...
|
2020-04-04 13:08:20 -05:00
|
|
|
then
|
|
|
|
|
echo ""
|
|
|
|
|
echo "ERROR: Unit tests failed!"
|
|
|
|
|
exit 1;
|
|
|
|
|
fi
|
|
|
|
|
|
2019-10-08 06:12:08 +11:00
|
|
|
# Build runtime
|
|
|
|
|
echo "**** Building Runtime ****"
|
|
|
|
|
cd runtime/js
|
2019-10-08 06:20:30 +11:00
|
|
|
npm install
|
2019-10-08 06:12:08 +11:00
|
|
|
npm run build
|
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
|
|
cd cmd/wails
|
2020-03-28 10:34:27 -05:00
|
|
|
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
|
2019-10-08 06:12:08 +11:00
|
|
|
cd ../..
|
|
|
|
|
|
|
|
|
|
echo "**** Tidying the mods! ****"
|
|
|
|
|
go mod tidy
|
|
|
|
|
|
|
|
|
|
echo "**** WE ARE DONE! ****"
|