2016-11-12 04:27:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Fail the build on any error
|
|
|
|
set -eou pipefail
|
|
|
|
|
2017-11-27 18:57:43 +00:00
|
|
|
trap failure ERR
|
|
|
|
function failure {
|
|
|
|
echo ""
|
|
|
|
echo "=================================="
|
|
|
|
echo " ✘ Build failed"
|
|
|
|
echo "=================================="
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "Run unit tests"
|
2017-11-25 11:01:30 +00:00
|
|
|
npm test
|
2017-03-06 12:46:46 +00:00
|
|
|
|
2017-11-27 18:57:43 +00:00
|
|
|
echo "Verify lightgallery dependency is built in"
|
2016-11-12 04:27:16 +00:00
|
|
|
grep \"lightgallery\" package.json 1>/dev/null
|
|
|
|
|
2017-11-27 18:57:43 +00:00
|
|
|
echo "Comparing gallery snapshot"
|
2017-11-25 11:29:21 +00:00
|
|
|
scripts/verify
|
2017-06-14 07:44:28 +00:00
|
|
|
|
2017-11-25 11:29:21 +00:00
|
|
|
echo ""
|
2017-11-27 18:57:43 +00:00
|
|
|
echo "=================================="
|
|
|
|
echo " ✔ Build successful"
|
|
|
|
echo "=================================="
|