#!/bin/bash # Fail the build on any error set -eou pipefail trap failure ERR function failure { echo "" echo "==================================" echo " ✘ Build failed" echo "==================================" } echo "Run unit tests" npm test echo "Comparing gallery snapshot" scripts/verify echo "" echo "==================================" echo " ✔ Build successful" echo "=================================="