2016-03-03 17:21:24 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e;
|
|
|
|
|
2017-05-31 18:50:42 +02:00
|
|
|
echo "$(tput setaf 136)"
|
|
|
|
echo "============================================="
|
|
|
|
echo " Starting tests "
|
|
|
|
echo "============================================="
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
|
|
|
npm test
|
|
|
|
|
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo " ✓ done testing"
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo "$(tput sgr0)" # reset
|
|
|
|
|
|
|
|
|
2016-06-23 16:23:53 +02:00
|
|
|
echo "$(tput setaf 136)"
|
|
|
|
echo "============================================="
|
|
|
|
echo " Starting build "
|
|
|
|
echo "============================================="
|
|
|
|
echo "$(tput sgr0)" # reset
|
2016-03-03 17:21:24 +01:00
|
|
|
|
2017-03-20 16:16:03 +01:00
|
|
|
##
|
|
|
|
## check for pull request against master
|
|
|
|
##
|
|
|
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
|
|
|
|
|
2020-05-25 12:21:33 +02:00
|
|
|
npm run build:staging
|
2017-03-20 16:16:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
## check for master push which is no pull request
|
|
|
|
##
|
|
|
|
elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
|
|
|
|
2020-05-25 12:21:33 +02:00
|
|
|
npm run build
|
2016-06-23 16:23:53 +02:00
|
|
|
|
2017-03-20 16:16:03 +01:00
|
|
|
else
|
|
|
|
|
2020-05-25 12:21:33 +02:00
|
|
|
npm run build
|
2017-03-20 16:16:03 +01:00
|
|
|
|
|
|
|
fi;
|
|
|
|
|
|
|
|
|
2016-06-23 16:23:53 +02:00
|
|
|
echo "$(tput setaf 64)" # green
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo " ✓ done building"
|
|
|
|
echo "---------------------------------------------"
|
|
|
|
echo "$(tput sgr0)" # reset
|