Archived
1
0

Add build test

This commit is contained in:
Asher
2020-03-25 17:08:42 -05:00
parent 511c3e95b2
commit 5bac2cbdb8
2 changed files with 24 additions and 3 deletions

21
ci/build-test.sh Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# build-test.bash -- Make sure the build worked.
# This is to make sure we don't have Node version errors or any other
# compilation-related errors.
set -euo pipefail
function main() {
cd "$(dirname "${0}")/.." || exit 1
local output
output=$(node ./build/out/node/entry.js --list-extensions 2>&1)
if echo "$output" | grep 'was compiled against a different Node.js version'; then
echo "$output"
exit 1
else
echo "Build ran successfully"
fi
}
main "$@"